This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Android and the fly likes Device id - which one to choose Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Device id - which one to choose " Watch "Device id - which one to choose " New topic
Author

Device id - which one to choose

Nidhi Sar
Ranch Hand

Joined: Oct 19, 2009
Posts: 252

Hi folks,

I had asked this question a few days back at android-developers site, but didn't get any detailed answers, hence the cross-posting.

Thank,
Nidhi


Like a lot of other applications, my application has different levels of features access. Depending on the unique device ID, it switches on certain features (paid/licensing issues). This feature switching on-off is already done in existing native C/C++ code for all kind of mobile devices/PCs etc, so I wouldn't be using Androids new in-app billing (even if it provides this functionality)

I need a unique (6 byte, hex string) device id. I have looked at the following options:

1. ANDOID_ID

Looks good, but there seem to be some issues with this.
1. This can show up null, unless the device has atleast once logged onto Android market, as per this discussion

I've read in other places too, that it might be null - due to this or other causes.

2. Certain devices have a bug where many devices show up the same (supposedly) unique id, as per this discussion

2. MAC address

This will not be available if the device is not wi-fi enabled.

3. IMEI/ MEID

Application will be potentially running on non-telephone devices like tablets too, so this is not an option.

I'm really stumped at this point. Any guidance would be much appreciated.


"A problem well stated is a problem half solved.” - Charles F. Kettering
SCJP 6, OCPJWCD
 
jQuery in Action, 2nd edition
 
subject: Device id - which one to choose