Reputation: 14668
I am trying to modify the android lvl library and as part of this I included the code as part of my project source ( diff package) instead of using it as a library. However this code is failing
boolean bindResult = mContext.bindService(
new Intent(ILicensingService.class.getName()),
this, // ServiceConnection.
Context.BIND_AUTO_CREATE);
if (bindResult) {
mPendingChecks.offer(validator);
} else {
Log.e(TAG, "Could not bind to service.");
validator.getCallback().stop("Could not bind to service.");
}
It is saying:
Unable to start service Intent { act=com.myApp.com.android.vending.licensing.ILicensingService }: not found
Why is that? How can I fix it? It was working as library but when the code incorporated it does not
Thanks for help
Upvotes: 1
Views: 345
Reputation: 33515
You creating Intent
i think incorrect. Try to replace yours with this:
new Intent(YourActivity.this, ILicensingService.class) //YourActivity is activity from its you want to start service.
Note: Don't forget add Service
to Manifest.xml
Upvotes: 2