I have a requirement as develop an application which will run on a mobile with a specific IMEI only.
The scenario is as follows, when user downloads an application from a website, he provides his mobile IMEI. The downloaded application should only run on a mobile with the IMEI with which the user is registered.

I want to know the best way to support this.

One way is application wouldn't contain anything, but at firt run it will ask the user to enter a serial number, this serial number is provided to the user at the registration time, and this serial number is generated using the IMEI provided by the user. The comman way could be to create a hash using SHA and use it as serial number. When user gives this serial number at first run the application will compare it with hash of the imei obtained from internal APIs. (System.getProprty).

Another way could be integrate the serial number inside the jar file which is downloaded by the user. But I am not sure exactly how to do this.

Can someone tell me how this kind of security is provided with the mobile application? And what is the easiest and fastest way. Is there any standardized way of doing this?

- Abhijit