Reputation: 282
I'm trying to start a service. This service is not meant to be called by other application.
I am trying to call startService
with an Intent that was created using Context and Class parameters. I'm trying to use createPackageContext(getPackageName(), CONTEXT_IGNORE_SECURITY)
to get the package context. startService
however is having no effect, onStartCommand
is never being called.
How do I start a service that is within the same package?
Upvotes: 0
Views: 308
Reputation: 1007218
How do I start a service that is within the same package?
startService(new Intent(this, MyServiceClass.class));
Upvotes: 1