0

Scenario:

I intend to make a donate version of my ad supported application, via paypal library. The process should be simple but effective: if the user makes the transaction, and the result is Ok, I will generate a serial number for the application and activate it.

Questions

  • the serial number needs to be generated based on something unique on the device. What should this be, the IMEI number ? Or maybe I should consider the current google account logged on the phone? In this way if the user changes the phone, he can still use the application.

  • I need to store this serial number in my application. What would be the easiest way to do this ? I wouldn't like to make a sqlite database only for this purpose, as I don't need it for something else. On each activity start I will check if the serial number is correct.

Any response is gladly taken. Thank you for your time.

dsolimano
  • 8,600
  • 3
  • 47
  • 62
Alin
  • 14,319
  • 38
  • 118
  • 206

1 Answers1

0
  1. You can use android unique id. See here.

  2. The storing is really simple. Just use shared preferences.

Community
  • 1
  • 1
Vladimir Ivanov
  • 42,109
  • 17
  • 76
  • 102
  • Thank you for your comment. I thought a little more on the issue and I thing I'll go with the current gmail account as a source for the serial number. In this way, the use can still activate the app if he gets a new device. – Alin May 10 '11 at 06:10