How to cache Licensing Responses with ServerManagedPolicy

  • Replies:4
  • OpenNot stickiedUnanswered
  • Forum posts: 3

Mar 5, 2019, 12:28:51 AM via Website

I have just started testing the Licensing Verification Library. I followed the pattern of the lvl_sample from Google, but the responses are not being cached. After doing a mChecker.checkAccess(mLicenseCheckerCallback) and getting a "LICENSED" response, I turned off wifi and tried it again, expecting to get the same response from the cache. But I got a dontAllow response with policy reason of Policy.RETRY. How can I get these responses cached?

Reply
  • Forum posts: 1,085

Mar 5, 2019, 4:00:12 AM via Website

I think you couldn't get the response cached just in your code. Try to check if there is any setting options in 'Settings - Google' of an Android device.

An ad-free & full-free app available on Google Play - https://goo.gl/ws42fN
A 5-star for the PURE app, please. Download size < 0.07 MB. Thank you.

Helpful?
Reply
  • Forum posts: 3

Mar 5, 2019, 4:24:55 AM via Website

I'm trying to implement Licensing in the app I am developing. It has to work on every customer's device, regardless of their personal Settings/Google.

Helpful?
Reply
  • Forum posts: 3

Mar 5, 2019, 5:20:20 AM via Website

OK, caching problem has been solved. It turns out that internal testing accounts expire the cache after 1 minute. I tried it out and sure enough, the license check returns LICENSED for one minute after wifi is turned off.

Helpful?
Reply
  • Forum posts: 1,085

Mar 5, 2019, 3:18:46 PM via Website

Okay, I see. The good news is that your problem has been solved.

An ad-free & full-free app available on Google Play - https://goo.gl/ws42fN
A 5-star for the PURE app, please. Download size < 0.07 MB. Thank you.

Helpful?
Reply