Android Test Test Response - Never Works

I am working on an Android application that is already published on Google Play. For the next update (versionCode = 3), my client wants to enable the LVL licensing scheme.

The first thing I did was set up a static test response from the licensing server. I installed the test answer LICENSED . After reading this in the documentation:

This test answer will be sent to the devices using [my email address] or the control accounts listed above for applications downloaded on Google Play. > In addition, this account (but not test accounts) will receive this answer for> applications that have not yet been downloaded to Google Play.

I thought this was not a problem, since the email of my developer account is the same as the email of my Google Play account on my test devices. Therefore, I should get a test answer when debugging the application.

After that, I read all the other licensed documentation and sample code and integrated it into the application. I used ServerManagedPolicy with the correct base64 public key and 20 random generated bytes as salt.

Once everything looks good, I downloaded it to the device to check it, but instead of receiving the LICENSED response that I expected, I always get NOT_LICENSED . I came back and made sure that:

  • I was connected to the internet.
  • I was connected to my developer account on Google Play.
  • LicenseChecker used the correct public key.
  • Clearing the Google Play cache.

At first I thought it might have something to do with caching, so I tried using StrictPolicy . The same answer. Since I did not purchase the application from the store, I had the impression that the licensing server was responding normally instead of sending a static test response . Here are some other things I've tried:

  • Waiting 24 hours and retrying.
  • I tried to create an application with the debug key android, as well as the current distribution key.
  • Set up and use a different test user account on Google Play. I have included this email account in the "Accounts" section of the developer console.
  • Downloading the APK on Google Play, but not publishing it.
  • The increment of the Code version is from 2 to 3. This is interesting because instead of the NOT_LICENSED response , it returns the application error code ERROR_NOT_MARKET_MANAGED .

This makes me think that the license server always responds normally, instead of sending a static test response configured to my developer account. I feel this may be because the application is already published, but I can’t risk publishing the debug assembly just for verification, or it’s not working.

Has anyone been in this situation before? Any help is appreciated.

+6
source share
3 answers

I spent hours and even days with the same problem, it is described here and in other places that the previously published license test hit and missed, and missed more than hit from what I found.

The only way I can work “more reliably” (but still not completely reliable) is to have a hardware device with default reset to factory options, and then set it as PRIMARY google user as the same as yours The dev account the test application is uploaded to.

Special AVDs are also not very reliable.

+1
source

I had the same problem, but I was able to solve it. Here's what I did to fix it: 1) on my device, I deleted all google accounts, except for the test account for which I configured. Apparently, the game store was still trying to use a non-testing account.

2) I had to activate the test status for my developer account, although I am the main developer and only a tester.

version increment thing didn’t help and honestly was a distraction .....

+1
source

I have the same problem when testing using the LVL library. I always get a response of 561 (0x231 NOT_LICENSED), regardless of why I set the response to the license check on the settings page.

My paid application users do not seem to complain, so I assume LVL works for them.

First, one of my applications had this problem, and it left after 1 day (published December 30, 2012), now I get a valid test answer in this application.

However, I still get the answer 561 (0x231 NOT_LICENSED) for a newer application (published January 31, 2013)

So now I just comment out (disable the warning dialog code that appears on 561) after publishing the APK and continuing my development for the next version.

I am not commenting (activate the warning dialog code) before posting again!

I contacted Google Play, they linked me to their developer forums. I sent the same question there, but then I can not find my post.

It’s good to know that I’m not the only one who faces this problem.

0
source

All Articles