We have an app that uses the following license policy: - if a definitive response of LICENSED is stored in the app's preferences and has not expired, allow access. - if a definitive response is not stored in the app's preferences, or if it has expired, or if the cached response is NOT_LICENSED, request a license check from the server. - if a definitive response (LICENSED or NOT_LICENSED) is received, it is stored in the prefs, along with the license validity period returned by the server. Access is permitted if the definitive response is LICENSED. - if anything other than a definitive response is received (airplane mode, server error, etc.), the last stored definitive response is used to determine access, even if expired. If no response is stored, allow access.
(This is basically the same as the LenientPolicy described in this thread<https://groups.google.com/forum/#!searchin/android-developers/%22NOT_LICENSED%22$20response/android-developers/Pg1R5COMLD8/mBiKJyUxp0MJ>. We're aware of its weaknesses, but generally it works for us.) The problem is that we occasionally receive reports of customers being denied use of the app due to a license problem. These are installations that definitely should be receiving a server response of LICENSED. When the problem happens, and when we've been able to obtain details, it always turns out that the user's device was not fully connected. When full network connectivity was restored, the app ran fine. Here's (part of) a report from a customer who has been unusually helpful: I'm using an Acer Iconia A500 tablet, running Android 4.0.3, kernel 2.6.39.4+. . . . So, I don't seem to be able to simulate it with airplane mode on. I also tried turning airplane mode back off, and it works fine right now. The situation where this happened to me it happened three different times, it was during a reading group at another person's house, and I don't have any access to their wifi network. So, there was wifi in the area, but I wasn't connected to any at all, but I wasn't on airplane mode either. . . If it happens again, I will try to watch more closely and take note of any network circumstances. We have not been able to reproduce the problem on either an emulator or on our test devices. As far as I can tell from our code, our app will always run unless it receives a response of NOT_LICENSED from the license client. Our assumption had been that this was only possible if the licensing client successfully contacted the license server and received a response of NOT_LICENSED (or had an unexpired NOT_LICENSED server response previously cached). But perhaps our assumption is wrong. Is there any situation where the licensing client on the device will return a response of NOT_LICENSED due to a communication problem (or any other reason besides having received that response from the license server)? Is there anything we could ask the customer to do that might help sort out what's going wrong? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.