Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LVL testing not working. Clear cache

I'm testing LVL in my app for first time. After reading carefully the dev guide, I implement the default sample using ServerManagedPolicy with few changes and uploaded as a draft to my developer account.
The fist time I ran my app I could see it was verifying the license (it delayed few secons and indeterminate progress showing). The callback was LICENSED. Perfect up to here.

But then I changed test response (in Edit Profile in my developer account) and next times I ran it, inmediately shows LICENSED without conecting and checking, like if it was reading from cache.

(I'm testing in a physical device and which has 2 google accounts (the developer one and other.)

Is there a way to clear this cache?
Or I'm doing something else wrong?

like image 775
jbc25 Avatar asked Jul 03 '26 12:07

jbc25


2 Answers

Another way is to use StrictPolicy for testing the results of the license check, so that no license results are cached.

Just replace the line:

mChecker = new LicenseChecker( this, new ServerManagedPolicy( this,
  new AESObfuscator( SALT, getPackageName(), deviceId ) ), BASE64_PUBLIC_KEY );

with:

mChecker = new LicenseChecker( this, new StrictPolicy(), BASE64_PUBLIC_KEY );
like image 154
DominicM Avatar answered Jul 06 '26 01:07

DominicM


Changing the salt should help to refresh a license response.

like image 33
skvalex Avatar answered Jul 06 '26 03:07

skvalex