0

I'm considering the possibility of making a currently paid Android app as free but with a grace period that is computed with actual utilization of the app. My question is about how actually does Android licensing work and how to explore its possibilities.

The scheme I have in mind works as following:

  1. User downloads the app for free
  2. User is allowed to freely use it up to N times, where the counter is incremented after a particular successful action
  3. After that a nag screen is presented and user must either stop using the app or buy an unlimited license from the Market

Actually an alternate way of making a grace period that is not time-based.

In particular, I must make sure that user must never be allowed to reset the counter by deleting app data from settings menu.

In fact, if I code the above requirements in a counter that is stored either in the SharedPreferences or on disk, with a plain counter that is reset on first start (when app storage is empty), then the user can cheat and reset the counter by deleting data associated with the app.

I would like to know if Google Licensing service allows to manipulate data that is remotely stored. In my case, I could remotely increment my counter so that when the app starts for the first time it checks for the remote value of the counter rather than the value stored on local device.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
usr-local-ΕΨΗΕΛΩΝ
  • 26,101
  • 30
  • 154
  • 305

1 Answers1

0

Google's licensing verification library (LVL) seems to provide most of what you want to do. It actually provide even more things like obfuscation etc..

  1. Overview of the policy
  2. How to set up the development environment for it
  3. How to implement the APIs in your App

User is allowed to freely use it up to N times, where the counter is incremented after a particular successful action

To understand how this is implemented read here about the Retry period and maximum retry count which can be set as a part of the license.

I would like to know if Google Licensing service allows to manipulate data that is remotely stored. In my case, I could remotely increment my counter so that when the app starts for the first time it checks for the remote value of the counter rather than the value stored on local device.

This is what you can do :

  1. In the GR extra Tags of the License file, store how many times an App can be used on a system.

  2. Enforce 'Strict policy' on the license

  3. On each start of the App send a request to server (with the unique Device/User Id) for returning you how many time the App has been started.

  4. Check this value received with the GR Tag's value and see if it is ok to run the App.

    i. If valid, run the App and send a request to your server (with the unique Device/User Id) to increase the counter about how many times this Application has been used and keep this record there.

    ii. else show a nagging message and exit.

Am quoting about the 'Strict Policy' of LVL :

The LVL includes an alternative full implementation of the Policy interface called StrictPolicy. The StrictPolicy implementation provides a more restrictive Policy than ServerManagedPolicy, in that it does not allow the user to access the application unless a license response is received from the server at the time of access that indicates that the user is licensed. The principal feature of StrictPolicy is that it does not store any license response data locally, in a persistent store. Because no data is stored, retry requests are not tracked and cached responses can not be used to fulfill license checks.

Amit Tomar
  • 4,800
  • 6
  • 50
  • 83