2

i'm testing the android license verification library (LVL) in my app. my implementation is currently bone-stock. i haven't modified the library, and i'm using the ServerManagedPolicy. i have my developer account set to return LICENSED all the time. i'm testing on my physical device, and am signed in on the device with my developer account. a version of my app exists on the android market, but it does not have the LVL in it yet. my app checks the license at startup.

so far, it seems to work fine, with one exception. when the app attempts to check the license when there is no network connectivity (airplane mode), the license check always fails. my understanding is that with the ServerManagedPolicy, the license response is supposed to be cached, so that one license check failure isn't going to disable the app. is this incorrect?

i know i could check for network connectivity before checking the license, and then decide for myself how many failures to tolerate, but i thought that the ServerManagedPolicy is supposed to handle all that automatically.

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
Ben H
  • 3,855
  • 1
  • 26
  • 33

1 Answers1

0

There are two ways to check for LVL:

  1. Every time (StrictPolicy)
  2. Occasionally with expiration (ServerManagedPolicy)

I recommend you go with ServerManagedPolicy; I expect you are using StrictPolicy. Also, you may want to simply check for connectivity and allow access depending on what your app is and how it works.

Another possibility to keep in mind is that ServerManagedPolicy only caches for a short period of time in test scenarios. Once you deploy you may be fine.

Community
  • 1
  • 1
Keith Adler
  • 20,880
  • 28
  • 119
  • 189
  • it doesn't seem like you read my question. i clearly stated that i am already using ServerManagedPolicy. however, the link provided was helpful. thanks for that. – Ben H Aug 02 '11 at 15:05
  • I apologize. I put in the fact that there are two methods to check licensing just to document this for others going forward. The link I provided was what helped me get over this hump as well when I put in LVL ServerManagedPolicy. – Keith Adler Aug 02 '11 at 15:24