Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is it possible to get a unique identification number from a mobile device?

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.

like image 986
Pierre Avatar asked Jul 28 '10 10:07

Pierre


People also ask

How do I find my mobile unique ID number?

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#*#*.

What is Unique Number in mobile device?

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.

How do I find the unique ID on my Android phone?

To retrieve the unique ID associated to your device, you can use the following code: TelephonyManager telephonyManager; telephonyManager = (TelephonyManager) getSystemService(Context.


2 Answers

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!

like image 125
Pierre Avatar answered Sep 27 '22 19:09

Pierre


Sam Greenhalgh just found a way of setting a device ID via "Super Cookie":

http://www.radicalresearch.co.uk/lab/hstssupercookies (archived link)

like image 20
chickenchilli Avatar answered Sep 27 '22 17:09

chickenchilli