2

I am looking to make a trial version of an app I made. Basically I want to put a time limit on how long the app will function before a window comes up that states that the user must buy the paid version of the app.

Thanks for any tips ahead of time!

FelipeAls
  • 21,711
  • 8
  • 54
  • 74
CodeMonkeyAlx
  • 813
  • 4
  • 16
  • 32
  • 2
    The problem with this is Clear Data / reinstallation. If you have a server, you could create a uniqueid from the device and store it server-side for a more robust solution. – William Melani Aug 29 '12 at 21:09
  • 3
    I don't think there is a 100% way of doing this. There will always be a way around it. It would be better to maybe disable some features for free version, or and ad supported version like most apps do. – Mario Aug 29 '12 at 21:11
  • Thanks for all the answers guys! – CodeMonkeyAlx Aug 30 '12 at 18:02

2 Answers2

5

When your application is installed for the first time on the device, connect to your server and assign it a unique id for the device.

Every time the application is started, check for the expiration date corresponding to the device and show appropriate message when the trail period gets over.

Or otherwise, disable a few features and release them only when the user buys it.

Don't use SharedPreferences because the user can easily clear the application data and the time would be reset.

Swayam
  • 16,294
  • 14
  • 64
  • 102
  • While both your and Niek answers would work, this limits the app to having to connect online. Without knowing what his app does or anything about it, it may not be a solution. Up vote anyways for providing one way! – Mario Aug 29 '12 at 21:17
  • @mario : Thanks for the up! And yes, I do understand what you are trying to say. And you are right when you say that there will always be work around to it. – Swayam Aug 29 '12 at 21:24
1

Use a server with a database that stores phone id's and dates. Then retrieve the status for the current phone. When the user installs a new rom, the id will change, so that should not be very often.

nhaarman
  • 98,571
  • 55
  • 246
  • 278