[android-developers] Re: Unique device id - which one to choose

2011-02-24 Thread gcstang
From what I've read on some other sites retrieving the MAC with the Wifi off will not always return a valid MAC (as in my case) and some devices don't have Wifi at all. One site as an example : http://stackoverflow.com/questions/4468248/unique-id-of-android-device Quoted from that site : You

[android-developers] Re: Unique device id - which one to choose

2011-02-22 Thread Oceanblue
gcstang, I need to get the MAC address from the NDK layer, so I used the socket call: s = socket(AF_INET, SOCK_DGRAM, 0); I have a Motorola Driod, but hopefully in a few days, I'll be able to check this code on other phones too. On Feb 16, 10:56 am, gcstang gcst...@gmail.com wrote:

[android-developers] Re: Unique device id - which one to choose

2011-02-16 Thread gcstang
What did you use to get the MAC, when I tried it on my Droid (gen 1) with the wifi off I get a NullPointerException On Feb 15, 4:48 pm, Oceanblue ns1...@gmail.com wrote: Thanks for your input Brad. I've decided to go with MAC address for now. I tested with my device with wi-fi switched off

[android-developers] Re: Unique device id - which one to choose

2011-02-15 Thread gcstang
Using a Hash of all the ID's is most likely the best solution, gather all the ID's, append your own signature if you like (optional) and hash the long concatenation of all the ID's you can gather, I would recommend using SHA. Most likely not all phones will have all available ID's so by using

Re: [android-developers] Re: Unique device id - which one to choose

2011-02-15 Thread Marcin Orlowski
Using a Hash of all the ID's is most likely the best solution, gather all the ID's, append your own signature if you like (optional) and hash the long concatenation of all the ID's you can gather, I would recommend using SHA. I wouldn't hash it on client side. If any of the value is missing

[android-developers] Re: Unique device id - which one to choose

2011-02-15 Thread Oceanblue
Hi Narendra, Thanks for your answer. Could you please elaborate on your reasons for preferring MAC address to ANDROID_ID (in android.provider.Settings.secure)? Thanks! On Feb 14, 1:00 am, Narendra Bagade bagadenaren...@gmail.com wrote: Mac will be best option for unique representation of

[android-developers] Re: Unique device id - which one to choose

2011-02-15 Thread Brad McNeiL
Just a note if you choose to use the IMEI/MEID - On some HTC devices, if the device is put in to the Airplane mode, switched off (while taking a flight scenario), and then if the device is powered back on, and then taken out of the Airplane mode. This might seem like a very normal thing to do.

[android-developers] Re: Unique device id - which one to choose

2011-02-15 Thread Oceanblue
Thanks for your input Brad. I've decided to go with MAC address for now. I tested with my device with wi-fi switched off in Airplane mode I was able to retrieve the MAC address (using Android API) in both cases. Hope this is the right choice. On Feb 15, 12:19 pm, Brad McNeiL