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
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:
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
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
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
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
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.
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
8 matches
Mail list logo