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