How to Manage Offline Trial Expiration for an Android Application?
Asked Answered
M

1

6

I have developed an application that I want to share with my clients. I want to share its trial, taking care of following points

  1. Application should expire (i.e. User cannot move from main activity) after 30 Days
  2. Internet connection is not required for my application so I don't want to manage trial expiration by managing a server where device's IMEI can be stored or sort of thing.
  3. I want to restrict user from using application even if he uninstall and later on re-Install my app.
  4. I want to protect application trial against a manual date changing hack normally applied by users

I was planning to maintain a file for my application with time token of first run saved in it which can be compared with GPS time on each run but the issue I am facing here is of file storage. If I save a file in Internal memory it gets deleted with application un-install and cannot be used when user reinstalls the app and if I store it on SD card/ External memory it is vulnerable to user deletion. I have investigated this issue from everywhere I can but got no success. Any idea or suggestion by you guys would be a relief. :-)

Margartmargate answered 4/7, 2012 at 5:57 Comment(6)
i think you covered your possibilities very well. I would consider the server option. Most Android Users should have internet access and it shouldnt be much of a problem.Reflection
My Application is subjected to be used in remote areas where no internet access is available. I cannot use server option keeping in view the mentioned limitation :-(Margartmargate
I see, a compromise solution could be the necessarity to activate the trial online and to generate some sort of encrypted time stamp file on sd. which user cant read because encryption and which is necessary for run. Of course device time manipulation is possible. but how many users would go that way?Reflection
You are right, With no access to internet this can be the only solution. As you said of encryption that is fine but the problem is encryption doesn't protect file from deletion and higher officials have concerns on, What if the user is advanced and deletes file from SD card? I have also investigated Saving file in Android System Direcotry approach which is somehow secure but requires root access which is not permitted. I know this is more than just isolation and cannot lead to a solution but this is what developers are instructed to do "Find the solution".Margartmargate
How did u solve your problem? I have similar problem can't figure out how to go about it.Aulic
I couldn't find any solution to offline trial expiration as of yet. Currently, I am placing application's APK along with an encrypted file with application version in it on server. On each login application checks if the version present in server's directory is greater than current version installed, Update the application. This is not how I meant it to be but worked in my case as only admin is allowed the access of application's server and no random user can mess up with that. Please let me know when you find any solution to handle this. Thanks :-)Margartmargate
B
0

There will have internet access when the app is installed, or they wouldn't be able to install it.

Simply require that the user activate the app with a server the first time they use it. The app gets a "this app was first activated on yyyy-mm-dd" response from the server, and stores that info on a file in internal storage. From that point on, the user won't need to be on-line to use the app.

Beguine answered 2/3, 2013 at 16:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.