Unique identifier of a Smartphone

Asked

Viewed 1,441 times

7

I am developing a system and need to capture a unique identifier of the Smartphone.

In this case, the person would access the site by Smartphone and the site will capture some unique identifier of the device or even the browser. I thought of something like IMEI or the phone number, but I couldn’t find a way to do it.

  • I think it’s really hard to get that kind of information... Maybe what you can do is try to record some kind of information, either in cookie form or Localstorage to try to identify the visitor, even though there may still be flaws.

1 answer

5

Navigator

You can use the device.uuid, click here to open the link on Universally Unique Identifier (UUID)

var string = device.uuid;

Useful Javascript libraries

  • fingerprintJS: "Fingerprinting is a technique, outlined in the research by Electronic Frontier Foundation, of anonymously Identifying a web browser with Accuracy of up to 94%."

  • Panopticlick: "Is your browser Configuration Rare or Unique? If so, web sites may be Able to track you, Even if you limit or disable cookies. Panopticlick tests your browser to see how Unique it is based on the information it will share with sites it visits."

Android App

Add the following permission to your Androidmanifest.xml:

<uses-permission android:name="android.permission.READ_PHONE_STATE"/>

To recover the IMEI from the device:

TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
String imei = tm.getDeviceId();

References:

Unique device Identification - Stack Overflow

  • I think his idea is that this could be done via browser/javascript and not in a native or hybrid application =/

  • I edited linking with Javascript libraries that may be useful

  • 3

    Remember that any identifier coming from a remote device or browser can be easily forged. Then it would not be appropriate if the end is related to authentication or some kind of security.

  • Well remembered @utluiz, I didn’t remember about this fact that has the possibility to occur.

  • 3

    What you usually do is use a traditional login form and then place a temporary token in the browser in a cookie. Then you can "remember" the user as long as the cookie lasts. The cell phone identifier can serve as an additional data in this process, as it would be a second control barrier.

  • In fact, as Wakim said, it must be captured by the navigator.

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.