开发者

Android Licensing - check once or every time?

I'm开发者_StackOverflow社区 installing Android Licensing in my app, and I would like to know what is considered good form for checking the license - each and every time, or just once and saving the fact that it's been licensed to shared preferences for example? My concern is that the user will be locked out of the app if they're offline.


Personally, I think the smartest idea would be to force the check once at initial startup, to make sure it's actually theirs, and then if the phone has connection, check the license every time, or every other time at startup. It may be smart for you to force the check at specific intervals in addition, such as every week, it must be validated or it will lock them out.

It's smart to maintain a balance that won't infuriate the user, but that will also accurately validate the application.

Make sense to you?


I would check every time the person has an internet connection:

  NetworkInfo i = conMgr.getActiveNetworkInfo();

  if (i.isConnected() || i.isAvailable()) {
      //There is a connection, check licensing
  }

It seems the most logical way. I'm not familiar with licensing, does it take a long time to do it?


Here is a good way to check for the network. Downside is you'll need another permission in the manifest

Detect whether there is an Internet connection available on Android

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜