How to create serial numbers unique to a mobile. (Using IMEI number)
Games and most applications in the Windows world come with a
trial period, during which you can test the application. If you find the
application to your taste, you can purchase the full application, which is
usually a simple serial key to unlock the application.
There have been several attempts to adapt such a method to
the mobile programming world. However, it’s not easy to generate a foolproof
method as the computing power required to generate a strong hash (read as
serial number) or to verify it, is limited in a mobile device. The major
difficulty lies in generating a number, which is unique to a mobile.
But Hey, we don’t want to *create* a new number. We already
have a unique number for every device, which is the IMEI number. Why not use
that?
The only difficulty is that Java ME doesn’t expose any
standard API to get the IMEI number of the device. However, most manufactures allow
us to get the IMEI number using the System.getProperty() method. Here is a HowTo:
Nokia
System.getProperty("phone.imei");
System.getProperty("com.nokia.IMEI");
Sony-Ericsson
System.getProperty("com.sonyericsson.imei");
Samsung
System.getProperty("com.samsung.imei");
Siemens
System.getProperty("com.siemens.imei");
thanks: mypapit


4 Responses to How to create serial numbers unique to a mobile. (Using IMEI number)
Does anybody have any idea how many of those manufacturers' devices really do support retrieving the IMEI? There seem to be additional problems, like applet signing (Series 40) etc...
Motorola: System.getProperty("IMEI")
Bug as said in comment #1 Midlet has to be signed :(
The property for Samsung devices does not work. Have you tried on a real device? If you did and it worked, what device was it?
Real useful stuff. I will use it to "create" a unique number when several clients log to the same server. It is a real shame that this is not part of the MIDP standard.