How to make app identify if it was installed on this device before and if yes then when(Date)?

1.4k views Asked by At

I am making an app.Which has a free trial version and a premium version.The free version runs as premium for 7 days and after that it will prompt user to buy premium and exit.To do so I have come up with some ideas such as:

1)Identify the device uniquely and send that unique id and date to a server.And on start up check if this device's app is more than 7 days old if so block it.And when the user uninstalls the app and installs again upon registering to the server the app will be blocked.I have read about some ways of identifying a device uniquely.But as this link suggests none of them is reliable and won't work on every device and OS version.

2)I can write a file to sdcard indicating the app installation and check for that particular file on first run to detect re-installation.But that file can be easily deleted by the user and the app re-installed thus obtaining another trial for 7 days which is not acceptable.

Is there a way I can attain my goal?

2

There are 2 answers

1
Simon On BEST ANSWER

These things can be done but, I encourage you to think again. What you're proposing is not good for your users and not good for users usually means lower app sales.

The app has to check with your server every time it starts. So I can't use it if I have no data connection or your server is down? Even if I paid for it?

Whatever you do, it can be defeated, especially if using date bound stuff.

I recommend that you think about adding value to the premium version, which is not in the free version, that will encourage people to buy. Or support the free one with advertising, which a lot of people will gladly pay a reasonable amount to get rid of. I recommend NOT releasing a free version which is in someway crippled but rather to make your paid version valuable to the user.

2
Suvam Roy On

My suggestion is that -

Trial version -

  • Send a time stamp key(a key as hex string which holds current time and device serial number and trial or premium id) to the server when it is started. In server if any key is not stored, that means the app is started first time and save it for future checking. Server will send a time stamp key(key with server current time) to the device. And device will save this key in local database.
  • Next time when the app wii start again, the key will be sent to server and server will extract time and serial number from key and check with the first key(as identified first launch), if it exceeds 7 days as identified that the app has been expired.
  • If network is not available don't start the app.

    Premium version -

  • Extract the trial or premium id from key, it is premium don't expire the app just keep continue the app.

    It will work for all cases if user change the device time won't hamper this logic.