-1

I have already wasted days with what seams to be an error in the Google license verification framework.

I am testing the Google market License Verification Library. I have thus far: - created a library and test project from the provided library and sample sources with no changes (except public key and other obvious things). - created a publisher account on market - I have not uploaded the application to the market - installed the sample application to a device - In the developer console added test accounts - I have set various test responses in the developer console

My problem is that I always get a NOT_MARKET_MANAGED response - regardless of settings in the developer console test response. The docs state that I have to be signed in a device with a publisher account. It does not say what does this mean specifically. I have added a publisher account to the accounts in the device but this does not help. Since the License Library depends on Market application I have changed the account in Marker application. No effect either. I have googled around and found something in the line "… that I have to be signed in with publisher account as primary account…". What exactly is primary account remains vague. Some sources state that a factory reset is needed for a primary account sign in. I have not tried that but I think you loose whatever you made on the device, installs, messages, contacts and such. This is impossibly impractical. My question is: How does one test the application against various responses?

David Snabel-Caunt
  • 57,804
  • 13
  • 114
  • 132
Anderson
  • 1,011
  • 2
  • 11
  • 24
  • 4
    'I have not uploaded the application to the market' and 'I always get a NOT_MARKET_MANAGED response' seem to be the key statements here... – David Snabel-Caunt Dec 12 '11 at 15:31
  • 1
    I've implemented LVL in a couple of apps and written a [server side verification library](http://code.google.com/p/android-market-license-verification/). You have to upload your application so that the Android Market is aware of your package or it is going to respond 'Not Market Managed'. Upload a draft application and then you can play with the forced responses. – David Snabel-Caunt Dec 12 '11 at 16:18

2 Answers2

2

On the developer console it is clearly stated:

This License Test Response will be sent to devices using publisher_account 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.

The same is also stated in this section of docs:

http://developer.android.com/guide/publishing/licensing.html#test-acct-setup

I know that testing is possible with uploading the apk to the server. But besides setting the test response in developer console one has to do:

  1. Compile the application without debug flag
  2. Create a certificate
  3. Sign the apk with certificate
  4. Upload the apk to the server

All this is a major PITA. Something that could be just a simple run and test is now a whole procedure, just for testing the most basic functionality of a prototype.

Taken into consideration the discrepancy between the docs and License Verification Framework behavior there is only one possible conclusion. Either docs or implementation (or both) are flawed.

Anderson
  • 1,011
  • 2
  • 11
  • 24
  • I've had exactly the same experience with this as you. While David Caunt's approach may be a valid workaround, the [Android documentation](http://developer.android.com/google/play/licensing/setting-up.html) clearly states that it is possible for the account owner to 'check license _before_ upload', both in figure 4 and table 1. – AwayTeam Nov 30 '14 at 18:49
1

Please read the Official Dev Guide carefully:

Setting test responses for license checks

Android Market provides a configuration setting in your publisher account that lets you override the normal processing of a license check and return a specified static response code. The setting is for testing only and applies only to license checks for applications that you have uploaded, made by any user signed in to an emulator or device using the credentials of the publisher account or a registered test account. For other users, the server always processes license checks according to normal rules.

And follow David's comments.

Community
  • 1
  • 1
yorkw
  • 40,926
  • 10
  • 117
  • 130