androidandroid-lvl

Android licencing ServerManagedPolicy returns dontAllow when no data connection is active


I've implemented the android licensing in my application following the example code using the ServerManagedPolicy.

The licence checker works fine, however when a device or emulator has no data connection then the licensing code will always return dontAllow(), while I want it to allow. I cannot seem to find anything on the page above that details how to avoid this.


Solution

  • This is an issue with using test accounts, they will expire the cached result after 1 minute (the minimum)

    This is probably because you can change the response the server gives to the test all possibilities and you wouldn't want to wait for cache to expire, or force it to refresh for each case.