Android Licensing cache duration.

Hi,

I added the license checking code to my app last night and tested it, and it seems to work well.

Thanks to Develephant, greg886 and ingemar for their posts.

https://forums.coronalabs.com/topic/41900-using-google-licensing-to-protect-your-corona-sdk-app-in-3-steps/

I implemented using ingemars extra check for if the error returned was a network error.

local networkError = (event.errorType == “network”)

This works well but obviously has the drawback that it will always work in airplane mode.

If the cache timeout is long enough then I’ll remove the above test, if it’s relatively short then I’ll leave it in.

I was wondering how long the cache is for the servermanaged policy? What I don’t want to happen is for someone to verify the license then the first time they try to use it on a plane a month later it won’t run.

One other solution is to write something out to a file the first time it is verified, then just check that all following times I guess.

I know that you can set the validity period if you do this natively on android, but I can’t see how this would work in Corona. 

pip pip!