0

I have the following service definition in AndroidManifest.xml

    <service
        android:name=".service.recommendation.Service"
        android:enabled="true"
        android:exported="false"/>

And the service declaration is as follows:

class Service : IntentService("RecommendationService"), ServiceContract.Service {
....
}

Is the recommendation service for an Android TV application.

I've tried to run this service via adb with /adb shell am startservice com.epix.epix/.service.recommendation.Service or even /adb shell am startservice com.epix.epix/RecommendationService with no luck. Had the same results by setting export=true, the service did not start.

Right now android chooses when to trigger my service, can I trigger this service from adb?

Calin
  • 6,661
  • 7
  • 49
  • 80
  • Explanation is [here](https://stackoverflow.com/a/37083375/3290339) – Onik Mar 30 '18 at 19:26
  • Sorry, I don't follow. Rooted devices can run services with export false, that is what i understand, but I am not able to run the service at all. – Calin Apr 01 '18 at 11:04
  • Then it's not clear what _"some goes for setting export=true"_ means... The way you use adb command might be wrong. Do you run those commands being `shell`-ed in? – Onik Apr 01 '18 at 11:44
  • I've edited the question, hope it makes more sens now. I simply try to run the service as I stated in the questio `/adb shell am startservice __name_of_the_service__` – Calin Apr 02 '18 at 03:00

0 Answers0