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 ...
- the manifest file contains the CHECK_LICENSE permission
- I am running exactly the same .apk file as I have uploaded to the developer account
- I have added a test user to the developer account
- The response is the same on an emulator running 2.2 and a device running 2.3
- The response is the same whether logged in as the test or developer user
- The response is the same whether I have selected LICENCED or NOT_LICENCED within the developer account
- Although both emulator and device have an internet connection at all times, the response is actually the same when no connection is present
- The code isn't obfuscated at the moment
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?