Android license check library offline

So, I configured Android LVL with my application to check the license. This seems to work fine with test accounts. The problem is that if I turn off the Internet connection with the phone and try to start the application, the license check will not be performed and will inform me that it is NOT licensed!

One thing is why this tells me that the application is NOT licensed and, more importantly, how can I make the application “remember” if it is licensed or not.

+3
source share
2 answers

Apparently, the answer to this question is that the license is not cached during testing, but in the market. I created a small application to check this out and it works!

+4
source

Sorry, but I also confirm that airplane mode makes it impossible to rely on any cache. Theoretically, if the application was connected to the network and the pingolo license server just before going offline, this might work. However, if the phone is disconnected for any significant period of time, there is no caching mechanism. Just look at the code. I filed an error against android: http://code.google.com/p/android/issues/detail?id=12978

Because my users Shout n 'Snap shoutnsnap.com ALREADY confirm this silly behavior.

, . EG:


IF LICENSED:
  PERSIST random key as LK
  PERSIST obfuscated random key as OLK
ELSE:
  if (deobfuscate(OLK) == LK) 
    GRANT ACCESS
  ELSE:
    GET LOST 

: http://code.google.com/p/androidbest/

+4

Source: https://habr.com/ru/post/1769095/


All Articles