Reputation: 61
I am trying to use Android Marketing Licensing within an, as yet, unpublished app.
I have installed and integrated the LVL libraries using the ServerManagedPolicy.
The problem is that, without exception, LicenseCheckerCallback.dontAllow is called with the response 'RETRY' when the license check is run.
I've read through many posts on this subject and ...
My code is basically that provided by the documentation ...
String deviceId = Settings.Secure.getString(getContentResolver(),Settings.Secure.ANDROID_ID);
mLicenseCheckerCallback = new MyLicenseCheckerCallback();
mChecker = new LicenseChecker(
this, new ServerManagedPolicy(this,
new AESObfuscator(SALT, getPackageName(), deviceId)),
BASE64_PUBLIC_KEY);
mChecker.checkAccess(mLicenseCheckerCallback);
What options do I have left to get this working?
Upvotes: 3
Views: 2173
Reputation: 61
The answer turned out to be here ... Android Context.bindService always returns false and ServiceConnection object is never triggered
The license check was being called from a tab page, so the code should be ...
String deviceId = Settings.Secure.getString(getContentResolver(),Settings.Secure.ANDROID_ID);
mLicenseCheckerCallback = new MyLicenseCheckerCallback();
mChecker = new LicenseChecker(
getApplicationContext(), new ServerManagedPolicy(this,
new AESObfuscator(SALT, getPackageName(), deviceId)),
BASE64_PUBLIC_KEY);
mChecker.checkAccess(mLicenseCheckerCallback);
Upvotes: 3