8

I've been working on an Android App that has already been published to Google Play. For the next update (versionCode = 3) my client wants to include the LVL licensing scheme.

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

This License Test Response will be sent to devices using [my email address] or the Test Accounts listed above for applications you have uploaded to Google Play. >Additionally, this account (but not the Test Accounts) will receive this response for >applications that have not yet been uploaded to Google Play.

I thought, not a problem, since my developer account email is the same as my Google Play account email on my testing devices. So I should receive the test response when debugging the App.

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

Once everything looked good I uploaded it to the device to test it, but instead of receiving the LICENSED response that I expected, I am always receiving a NOT_LICENSED response. I went back and made sure that:

  1. I was connected to the internet.
  2. I was signed in to my developer account on Google Play.
  3. The LicenseChecker was using the correct public key.
  4. Clearing my Google Play cache.

At first, I thought maybe it had something to do with the caching, so I tried using a StrictPolicy instead. Same response. Since I haven't purchased the App from the store, I'm under the impression that the licensing server is responding normally instead of sending the static test response. Here are some other things I have tried:

  1. Waiting 24 hours and trying again.
  2. Tried building the App with the android debug key, as well as the current distribution key.
  3. Setting up and using a different test user account on Google Play. I made sure to add this email account to the 'Test accounts' section in the developer console.
  4. Uploading the APK to Google Play, but not publishing it.
  5. Incrementing the versionCode from 2 to 3. This is interesting, because instead of responding NOT_LICENSED it returns the 'application error code' ERROR_NOT_MARKET_MANAGED.

This leads me to believe that the license server is always responding normally, instead of sending the static test response I set up to my developer account. I have a feeling it may be because the App is already published, but I cannot risk publishing a debug build just to test wether or not it is working.

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

4

3 回答 3

2

我有同样的问题,但能够解决它。以下是我修复的问题: 1) 在我的设备上,我删除了所有谷歌账户,除了我配置的测试账户。显然,Play商店仍在尝试使用非测试帐户。

2) 即使我是主要开发人员和唯一的测试人员,我也必须为我的开发人员帐户激活测试状态。

版本增量的事情没有帮助,老实说是一种分心.....

于 2014-07-11T22:30:06.367 回答
1

我已经花了几个小时甚至几天的时间来解决同样的问题,这里和其他地方都有记录,预发布的许可证测试是命中注定的,而且我发现的命中率比命中率高。

我发现让它工作“更可靠”(但仍然不完全可靠)的唯一方法是拥有一个重置为出厂默认设置的硬件设备,然后将其设置为与您的开发帐户相同的主要谷歌用户已上传应用程序以进行测试。

特殊的 AVD 也不是很可靠。

于 2012-12-02T05:21:27.640 回答
0

使用 LVL 库进行测试时,我遇到了同样的问题。无论我在设置页面中将许可证测试响应设置为什么,我总是得到 561 (0x231 NOT_LICENSED) 响应。

我的付费应用用户似乎没有抱怨,所以我假设 LVL 正在为他们工作。

起初我的一个应用程序有这个问题,它在 1 天后消失(2012 年 12 月 30 日发布),现在我在那个应用程序中得到了有效的测试响应。

但是,对于较新的应用程序,我仍然收到 561 (0x231 NOT_LICENSED) 响应(2013 年 1 月 31 日发布)

所以现在我只是在发布 APK 后注释掉(禁用弹出 561 的警报对话框代码)并继续我的下一个版本的开发。

在再次发布之前,我取消注释(启用警报对话框代码)!

我联系了 Google Play,他们将我推荐给他们的开发者论坛。我在那里发布了同样的问题,但后来我找不到我的帖子。

很高兴知道我不是唯一面临这个问题的人。

于 2013-02-20T23:59:09.347 回答