Is my Android licensing working as it should?

谁都会走 提交于 2019-12-24 09:57:23

问题


I have an app that uses the Android licensing. I'm using the ServerManagedPolicy which according to http://developer.android.com/guide/publishing/licensing.html should cache the server responses.

To test it I did the following:

  1. In the developer console, set the server answer to be "LICENSED" for my account.
  2. Connect the phone to Internet, and run the app. It shows the dialog I created to let the user know it is trying to obtain a valid license. It then shows that it found it and lets me run the app.
  3. I exit the app (back button) and the force close it.
  4. I disconnect from the Internet.
  5. I run the app again. I see the dialog again, but this time it says a valid license was not found and doesn't let me run the app.

Shouldn't the ServerManagedPolicy cache the license it found the first time and let me run the app the second time?

I haven't published this app yet. Could this have something to do?

Thanks!


回答1:


Don't worry, I had the same issue. When you use a test or dev account, licence is not cached bu the ServerManagedPolicy. But for your real clients, it will be cached by LVL.

Nothing in the docs says it clearly, but that works and actually, is nice feature for devs.

Regards, stéphane

Btw, You should add a link to your app in your profile as I did... I am curious about it but can't guess what it is.



来源:https://stackoverflow.com/questions/7142307/is-my-android-licensing-working-as-it-should

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!