I am trying to use Android Marketing Licensing in an unpublished application.
I installed and integrated the LVL libraries using ServerManagedPolicy.
The problem is that without a license, LicenseCheckerCallback.dontAllow is called with the answer "RETRY" when a license check is performed.
I read a lot of posts on this subject and ...
- manifest file contains permission CHECK_LICENSE
- I run the exact same .apk file as I uploaded to the developer account
- I added a test user to the developer account
- The answer will be the same on an emulator running 2.2 and on a device running 2.3
- The answer is the same whether it is registered as a test user or developer
- The answer is the same, regardless of whether I chose LICENSED or NOT_LICENCED in the developer account
- Although both emulators and devices have an Internet connection at all times, the answer is actually the same when there is no connection.
- The code is not confused at the moment
My code is mostly 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 make this work?
source
share