Skip to content Skip to sidebar Skip to footer

Android "not_market_managed" Error

Working on trying out the market licensing service, and I'm running into a few problems with the sample application. When I first ran the sample, I got an error saying that the app

Solution 1:

Yes your app has to be on the market and if it already is, you have to have a version code number which is greater or equal than the one already published.

Solution 2:

There may be another way. The comments on the sample's MainActivity read:

 * The first thing you need todoisget your hands on your publickey.
 * Update the BASE64_PUBLIC_KEY constant below with your encoded publickey,
 * which you can find on the
 * <a href="http://market.android.com/publish/editProfile">Edit Profile</a>
 * page of the Market publisher site.
 * <p>
 * Log inwith the same account on your Cupcake (1.5) or higher phone or
 * your FroYo (2.2) emulator with the Google add-ons installed. Change the
 * test response on the Edit Profile page, press Save, and see how this
 * application responds when you check your license.

And when you log into http://market.android.com/publish/editProfile you will see an option for changing the License Test Response:

enter image description here

Textually saying:

This License Test Response will be sent to devices using @gmail.com or the Test Accounts listed above for applications you have uploaded to Market. Additionally, this account (but not the Test Accounts) will receive this response for applications that have not yet been uploaded to Market.

If you click that selection list, you will see different options:

enter image description here

I guess all you have to do, for that initial sample LVL tutorial program, is change the response from Respond normally to LICENSED or any other setting you want to test.

UPDATE: It turns out that the above measure is insufficient. I still get the NOT_MARKET_MANAGED error. I guess that "Market Licensing Example" must be uploaded as previous answers suggested. Note, however, that it cannot be the debug version:

enter image description here

Oh, and you can't really upload that "Market Licensing Example" as is. You must at least change the name of the package:

enter image description here

I can see how Google's sample/example system could be improved to become more developer-friendly...

Weird. After uploading the application (just uploading and saving draft, not filling any other required fields), the "Market Licensing Example" stops issuing the NOT_MARKET_MANAGED error, despite the fact that clearly selected NOT_LICENSED. Instead it responds with the message Allow the user access. I also tried setting (for test & learning purposes) it to ERROR_SERVER_FAILURE but I get the same Allow the user access message.

Why?

Solution 3:

You'd have thought "Saved Draft" would be just what this is for. Otherwise, you're selling an app which by definition cannot have been fully tested live.

Solution 4:

Upload your app (.apk) to the market. The default state will be "Saved Draft", so it will not be be visible to the public, but you can still test the Licensing.

One other potential problem:

Make sure that the version you are testing/running has the same android:versionCode in the AndroidManifest.xml as the draft version in the market. If the versions differ, you will receive a NOT_MARKET_MANAGED error. (Apparently the RSA keypair used for license checks is on a per-app/per-version basis.)

Solution 5:

After a bit of a struggle I got this working. You can't use the LVL sample as is.

Here's what I did:

  • modify the project's package to something else (I used: lvl.test)
  • set MainActivity's BASE64_PUBLIC_KEY to the one in your Developer Console profile.
  • export the signed app
  • go to Developer Console and upload the app (create dummy images and give it a dummy name and description etc. just so that it saves and is listed as 'Unpublished')
  • install the exported app (from your filesystem) to your test device (i.e. adb install bin/path/to/your.apk)
  • on your device, open Android Market go to: Settings>Accounts> and select the one that corresponds to your Developer Console account
  • you can now select a static License Test Response in your Developer Console Profile and save it. When you run the LVL sample on your device the response will correspond to the one you picked!

Post a Comment for "Android "not_market_managed" Error"