2

The method suggested by android on how to obtain a unique id to track installations not devices is the following:

http://android-developers.blogspot.com/2011/03/identifying-app-installations.html

Does this mean by using the method above, users can "clear local data" on their devices meaning they will then have a new installation file installed?

I'm trying to find a decent way to limit the number of times my application is used, any other suggestions are welcome,

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
asd2005
  • 315
  • 2
  • 5
  • 12

1 Answers1

3

Create an ID locally, store it in prefs, and then back it up using Data Backup to the cloud via the user's Google Account, so when they reinstall it, the settings come back

http://developer.android.com/guide/topics/data/backup.html

Ollie C
  • 28,313
  • 34
  • 134
  • 217
  • awesome answer, I didn't know this link. – ahmet alp balkan Sep 03 '11 at 19:23
  • Hey ollie thanks for your great reply, i shall deffo check this method out. But if the user locally erasers the data, then im guessing when he next runs the app the data will be retrieved from the cloud? – asd2005 Sep 04 '11 at 16:50
  • "Data backup is not guaranteed to be available on all Android-powered devices." Is this method you suggested really reliable? – asd2005 Sep 04 '11 at 16:55
  • I think the Data Backup API was introduced with API level 8 (v2.2) so it will not work with all devices, and yes, in theory the user could locate the data and remove. If you need more security and backwards compatibility you may need to implement your own server-side solution to track registered devices, and perhaps use other OS/device generated IDs as well, but I expect it's impossible to get a 100% solution, but I am sure you can make it hard for people to bypass. It all depends how important this is to you. – Ollie C Sep 04 '11 at 18:41
  • hmmm do you suggest one way as using the users google account email as their "Unique ID" ?? – asd2005 Sep 04 '11 at 22:00
  • Possibly, but remember the Google Account may be used across several devices. You can access the Google Account details http://stackoverflow.com/questions/4038333/how-do-i-retrieve-the-logged-in-google-account-on-android-phones – Ollie C Sep 05 '11 at 10:50