-2

I create my app header on Google Play.

I create an application with google's LVL library. I sign into an Android device with the same account that I use to sign into my Google Play Developer Console.

The LicenseChecker was using the correct public key (from Google Play app license key). Clearing my Google Play cache and not having uploaded the application, but the license server needs a response set on the license test setting page, no?

when I'm running the app, the license server always responds: 3 (ERROR_NOT_MARKET_MANAGED).

I wait 24 hours, but nothing happens. The response is 3.

I upload the app (same version code) to the google play, but not published.

I wait 24 hours again, but nothing happens. The response is 3.

WTF :)

Okay, just back to the beginning step by step:

I create an app from the Android SDK's licensing sample. The LVL version is 2.

I make a header on google play.

A BASE64_PUBLIC_KEY rewrite in the sample from a google play app license. I sign in an android device with my publisher's account (after factory reset)

This sample is returned 3!

What's wrong with me????

  • have You changed the license test Response in the developer console? Have You registrated the same email account on Your console like You are use as Your Google account in Your device? – Opiatefuchs May 23 '14 at 10:25
  • Yes (now Licensed).Yes. – user1387082 May 23 '14 at 10:35
  • is this Your own app or an example? Because if you are using an example with the same package Name, then it is possible that it doesn´t work.. – Opiatefuchs May 23 '14 at 10:42
  • one is my full own appthe second is from the google sample, and the package name and a base64_public_key is updated with my own testname and from a google play app license. – user1387082 May 23 '14 at 11:13
  • ok, at least, it is possible that Googles lvl Server has Problems, I ran often about this Problem. actually, I have a license testing app on my console, to test from time to time if all works fine. This app give me the message, that it is not possible for now to reach the Server, so it is possible that Google got a problem – Opiatefuchs May 23 '14 at 11:27
  • thank you! but why response is a 3??? this is not responding from a google server? If the app does not connecting to the google server, the state is a not allow. – user1387082 May 23 '14 at 11:36
  • that´s a good question, I had many Problems with the lvl at the past. I will check my licensing app at this Weekend, if I can find anything out, I will let You know. – Opiatefuchs May 23 '14 at 12:22
  • Hi there...until now, none of my licensed apps will work. I don´t know what´s going on. Did You have success in the meanwhile? – Opiatefuchs Jun 12 '14 at 07:47

2 Answers2

0

I hope I can answer this question and I am able to help You, but if this answer does not help You, please show some code maybe it´s a simple coding Problem.

I had the similar problem for long Time, all my licensed apps had not worked (for me, but never get a negative response from users). I discovered two things: first, eclipse allways shows an error on my library project. This caused the warning on my licensed apks, that the reference to this library is not valid. In the past, I just cleared the "Problems" history and than it worked. What I have seen is, at the library manifest there was the targetSdk included:

    <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="17"/>

But the library project does not support the tag targetSdkVersion, so I deletet it:

    <uses-sdk android:minSdkVersion="3" />

After this, the error is gone and all licensed projects seems to be good. The seond problem is, since some time, saving apps as drafts is no longer supported like described here:

http://developer.android.com/google/play/billing/billing_testing.html#draft_apps

So, what You have to do is, upload Your apk to the alpha or beta test inside the console and publish it. This app could not be seen from other poeple, as long as You give the rights to some google groups for testing it. I set my response inside the console again to LICENSED and saved it. After waiting some time (up to 24 hours) until google play has noticed the changes, it worked.

Opiatefuchs
  • 9,800
  • 2
  • 36
  • 49
  • 1
    Thanks. The targetSdkVersion wasn't a problem for me, but my app was still in a draft state and that was the problem. I had to publish it as an alpha and then my licensing code could connect. – arlomedia Sep 18 '14 at 01:20
0

I too have often got ERROR_NOT_MARKET_MANAGED unexpectedly.
My problem was that I was using my main developer Gmail address as my testing account and my app was a paid app.

To fix my problem:
- I had to create a 2nd Gmail account,
- add it to my list of testers (click Settings on your Google Play Developer account to get the right screen),
- add that new Gmail account to the list of accounts on the mobile device you want to test on,
- then delete whatever version of your app you do have on your device,
- then load it using download through Google Play.

When you tap Google Play to start it (touch "play games") you'll see what Gmail account you are inside Google Play in the upper left of the screen. Change that to be your new testing account. NOW you can download your paid app (it never would let you before you did all this) and (hopefully) you will no longer get ERROR_MARKET_MANAGED.

How are you likely to encounter this error? In roughly, 3 ways.

  1. Let's assume that in LicenseChecker in method checkAccess that after the line:
    if (bindResult) {
    that you have put the line:
    System.println("good bind");
    and that in LicenseValidator in method verify you have placed:
    System.out.println("signature verified");
    in the line Before the line:
    } catch (NoSuchAlgorithException e) {
    Make sure you've gone to a new version number, upload to alpha, wait a while, then run. If you see:

    good bind signature verified

in the trace output and the error you get is ERROR_NOT_MARKET_MANAGED then I would say you've triggered this particular problem.


  1. If in method verify in LicenseValidator you put:
    System.out.println("begin verify call:" + responseCode);
    after ResponseData data = null;

and prep-then-run then you see:

begin verify call:561

then you might be having this problem.


  1. If you set DEBUG_LICENSE_ERROR to true in LicenseChecker and in wherever it is that you have put applicationError in your LVL initiation code you put:
    String result = String.format("Application error: %1$s", errorCode); System.out.println("result:" + result); //or display it on screen using a Toast

and prep-then-run and see

result: Application error:3

then you might be having this problem.


What makes this a particularly nasty thing to encounter is that when you set the testing response for this app to anything other than "respond normally" then your app behaves like it is responding perfectly to match to presently set license response.
However..when you set the test response to "respond normally" then you're going to always get ERROR_NOT_MARKET_MANAGED (if the app is paid and you're trying to use your primary Gmail account on your test device).

Merov
  • 1,028
  • 1
  • 14
  • 29