I am writing an application in J2ME. I want to identify the user thru his phone. Is it possible to find the phone number or any unique number associated to the phone ?
There isn't a MIDP API for retrieving either the phone number or the IMEI number of phones. Some manufacturers offer extensions for retrieving the IMEI number.
For a more general solution you would need to create your own service for identifying the phone. If you have network access you could create a GUID at application first launch and register it in a server.
There's the IMEI device-specific identifier that can be accessed through System.getProperty
on many phone models. However, the property name varies between manufacturers.
See http://stackoverflow.com/questions/680782/getting-device-imei for some further information.
One approach is to insert a unique identifier into the JAD file when the application is downloaded during installation. The app can then uniquely identify itself to the server by reading the identifier string from its JAD file.
I am seconding izb's answer here. I just want to add that there is more to it, like providing mechanism to store the unique identifier on server, mechanism to reset it (and corresponding UI) and regenerate and set it in the jad file. All these will be needed.