I am currently working on mobile device web applications, and I was wondering if there is some sort of unique id number per device that could be detected via the browser.
The purpose would be to store this number in order to recognize people who already visited the site.
I was working with bluetooth quite a lot, and there some sort of mac address you can store when you detect a device, and I was using this as Id number, so that's my question, is there a general ID number I can detect from the browser...?
Thanks.
Method 1: Find Android device ID using dial pad code Open your phone's dial pad, usually named “Phone” in the apps drawer. 2. Here dial this code *#*#8255#*#*.
It's a 64-bit number that should remain constant for the lifetime of a device. ANDROID_ID seems a good choice for a unique device identifier because it's available for smartphones and tablets. To retrieve the value, you can use the following code : String androidId = Settings.
To retrieve the unique ID associated to your device, you can use the following code: TelephonyManager telephonyManager; telephonyManager = (TelephonyManager) getSystemService(Context.
Well after further research, the answer is: No, it's not possible right now to get a mobile device id number from its browser...
A solution I found is to generate a "unique" number (in my case I worked with php, so I used the session_id() number mixed with a number generated with the rand() function, it ends up being a quite big number that will hardly occur twice...) and then store it in a cookie that never expires.
It's not a perfect solution, as it will not work if cookies are disabled or if the user clears his cookies, but actually after using it for sometimes now, it turns out that it is working quite well, mobile device mostly have cookies enabled, and the users don't seem to clear them often...
Also (depending of your application) if you store an email or a username and then associate it with this "unique" number into a database, you can even recover someone's identity and store a new cookie by asking him his username or email again...
Hope this will help some people!
Sam Greenhalgh just found a way of setting a device ID via "Super Cookie":
http://www.radicalresearch.co.uk/lab/hstssupercookies (archived link)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With