Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Uniquely Identify An Android Device? [duplicate]

Tags:

android

I was working on an app (server-android client) that allow user to sign in from multiple android devices. When user logged in on a device, that device will be registered on server side, but I don't know how to avoid duplicate, so I was wondering that are there any chances to uniquely identify an android device? I think Google Play and Facebook can do that.

like image 214
Đôn Nguyễn Avatar asked Oct 26 '13 05:10

Đôn Nguyễn


People also ask

How can you tell which Android phone is unique?

This unique ID can be IMEI, MEID, ESN or IMSI. They can be defined as follows : IMEI for International Mobile Equipment Identity : the Unique Number to identify GSM, WCDMA mobile phones as well as some satellite phones.

Do Android devices have a unique ID?

Android device IDs are determined during the device's first boot. Users can access their devices' randomly generated Android IDs by downloading a free app from Google Play. These device identification numbers should remain constant for the lifetime of the device unless the user performs a factory reset.

What is the unique identifier for a mobile device?

A Mobile Device ID is a unique customer identifier used to distinguish a mobile device. It could be an IDFA (Identifier for Advertisers) or an Android Ad Id.

What is Android device UUID?

Most mobile devices have a unique ID, also called a Universal Unique Identifier (UUID), assigned at the time of manufacture for identification purposes. For example, iOS devices are assigned what's called a Unique Device Identifier (UDID).


2 Answers

There are several options available, but there is no 100% guarantee that they will always work. See the android developer blog post: http://android-developers.blogspot.in/2011/03/identifying-app-installations.html

Best method mentioned is Settings.Secure.ANDROID_ID

like image 167
Aman Gautam Avatar answered Nov 13 '22 07:11

Aman Gautam


You can check the IMEI or MAC address of the device.

for IMEI

TelephonyManager.getDeviceId will work

for MAC

WifiInfo.getMacAddress will work

like image 33
stinepike Avatar answered Nov 13 '22 07:11

stinepike