Android licensing application not works?

允我心安 提交于 2019-11-29 07:19:21

Finally I found the proper way of testing of google license checker.

As I uploaded apk in google play developer console as draft and If I install that apk in any device than it will run with response LICENSED if in the device is not having login with test account.

And finally I do testing this way I added test account and i select License Test Response in developer console as LICENSED than app will run and after i also change setting in developer console with NOT_LICENSED than it shows dialog about piracy in the device which having test account as main account.

IMPORTANT NOTE :And other than test account devices it run with the response LICENSED beacuse is I uploaded APK as draft in play store.So for the testing google licensing we must have to consider only test account added in Google Play Developer Console

SubbaReddy PolamReddy

You already done all these steps but clearly check it once again:

  1. check once your's public key compare with the draft store public key.
  2. Give own salt 20 numbers.
  3. Give properly test accounts in the google play and same account use in the device also.
  4. In google play you have to put licensed mode for application draft.
  5. check after some time because it will take some time to give valid results.
  6. finally verify the alert dialog conditions in application.
  7. clear the google play cache in your mobile may be it will store the results.

The LVL is working on all devices with the accounts You added, not only the main account. It should not work on phones with an account You don´t added to the developer console. Even, the LVL tries to verify Your app with the google LVL -Server, so You need an internet connection, this is ok. If You just want to check the license once, You have to save some data for example in the shared preferences, that the check has already done. So, the next time the app starts, you could check with these saved shared preferences, if the app is just verified. If yes, do no check again, if no, try it again.

You can set the behavior of checking license in the developer console, You can simulate a normal response, or for example a "not verified" response and so on....

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