Reputation: 133
Since I have updated my phone to the Lollipop version of Android, my applications crash when they try to check the Google license (call to checkAccess
). The error message is :
"java.lang.IllegalArgumentException: Service intent must be explicit: Intent {act=com.android.vending.licensing.ILicenseService".
The code I use is :
myLicenseChecker=new LicenseChecker(myActivity,new ServerManagedPolicy(myActivity,new AESObfuscator(salt,myActivity.getPackageName(),identificationMatériel)),myPublicKey);
myResponseAnalyzer=new MyResponseAnalyzer();
myLicenseChecker.checkAccess(myResponseAnalyzer);
I have added the "com.android.vending.CHECK_LICENSE" permission in the manifest file but it had no effect at all.
What could be the cause of the generated error?
Upvotes: 0
Views: 660
Reputation: 181
It's a known Licensing Library bug.
Reported solution:
As I put a few hours ago at issue 1674 , another working solution is:
Intent serviceIntent = new Intent( new String(Base64.decode("Y29tLmFuZHJvaWQudmVuZGluZy5saWNlbnNpbmcuSUxpY2Vuc2luZ1NlcnZpY2U="))); serviceIntent.setPackage("com.android.vending"); boolean bindResult = mContext .bindService( serviceIntent, this, // ServiceConnection. Context.BIND_AUTO_CREATE);
Bug report with solution above.
Upvotes: 1