views:

99

answers:

3

I'd like to have an unique identifier for a cell phone. Since there is not a particular way to find IMEI or IMSI on every mobile, I want to know if there are other ways to find an unique identifier for a cellphone. Can anyone suggest a way?

A: 

Update:

Make a service call to server and there generate a unique identifier using UUID [preferred way]

Now on mobile device recieve this UUID and store it in RMS.

Its not related to Bluetooth[UUID]

org.life.java
what is UUID ? how do i get it in j2me ?
Hasnain
@user461717 added more info
org.life.java
[Psssh, here's the JavaME API, do you see `java.util.UUID`?](http://download-llnw.oracle.com/javame/config/cldc/ref-impl/cldc1.1/jsr139/index.html) This answer is in essence wrong.
BalusC
@BalusC I know there is a class UUID in ME for sure but reference i had given may be of SE, i hope you are talking about that
org.life.java
At least not in JavaME. See also the link. You've to homegrow it or take another library. This is often provided by the API of the underlying platform.
BalusC
@BalusC No , Its there in default environment for sure.
org.life.java
Yes, the API of the underlying platform. Your `java.util.UUID` link is at least misleading.
BalusC
@BalusC yeah true. link is wrong ,let me update it.
org.life.java
@BalusC I forgot my mistake, I 'd implemented this long back , I updated the answer.
org.life.java
what if the device dosnt have Bluetooth ?
Hasnain
@Hasnain Its not related to Bluttooth, Let me clear the things,Updated the answer
org.life.java
+1  A: 

You can use just time in millis if you don't need strong UID. Or you can get UUID implementation from J2SE and port it to J2ME. In this way UUID should be stored in RMS. One of the best way is to build server side and distribute app only via this service. When new user try to download app you can put into manifest and jad any UUID you want and use it in your app via MIDlet.getAppProperty( String uuidPropertyName );

Donz
what if the device dosnt have Bluetooth ?
Hasnain
I don't understand your question. All my options don't depend on Bluetoot. Do you mean UUID class? I told about this class - java.util.UUID not about javax.bluetooth packages.
Donz
+1  A: 

If your target device has JSR82, you can use LocalDevice.getLocalDevice().getBluetoothAddress() -- that's unique.

funkybro