Hi everybody,
I've tried to use the new license service of Android and I am facing some troubles. My code in the main activity looks like this:
mLicenseCheckerCallback = new MyLicenseCheckerCallback();
String deviceId = Secure.getString(MainTabActivity.this.getContentResolver(), Secure.ANDROID_ID);
mChecker = new LicenseChecker(
MainTabActivity.this, new ServerManagedPolicy(MainTabActivity.this,
new AESObfuscator(SALT, getPackageName(), deviceId)),
BASE64_PUBLIC_KEY
);
mChecker.checkAccess(mLicenseCheckerCallback);
(basically just the shown code of the Android online documentation. The callback passes through if it's allowed and if it's not it displays a message and quits the app. So far so good.
The problem is that it works fine in the debugger, but when I publish it to the market and upgrade my app (I've purchased a version of my app with my personal gmail-accout, so I am a legitimate user) I get the error that the my app is not licensed. I've even added my personal gmail address to the whitelist in my market-profile and set the status to "LICENSED" but it still comes up with the error. Do you have any suggestions ?