You are checking this blog from the link below.
http://android-developers.blogspot.in/2011/03/identifying-app-installations.html
ANDROID_ID
import android.provider.Settings.Secure; private String android_id = Secure.getString(getContext().getContentResolver(), Secure.ANDROID_ID);
Above link is @ Is there a unique identifier for an Android device?
In particular, Settings.Secure.ANDROID_ID. This is a 64-bit amount that is generated and saved the first time the device boots. When erasing the device, reset .
ANDROID_ID seems like a good choice for a unique device identifier . There are drawbacks: firstly, it is not 100% reliable in Android releases prior to 2.2 ("Froyo"). In addition, at least one well-known mistake in a popular phone from a major manufacturer, where each instance has the same ANDROID_ID.
The solution below is not a good one when you wait for the device’s wet wipes (“Factory reset”), and thus you can make an unpleasant mistake when one of your customers wipes its device and transfers it to another person .
You get the imei device number using below
TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE); telephonyManager.getDeviceId();
http://developer.android.com/reference/android/telephony/TelephonyManager.html#getDeviceId%28%29
Add this manifest
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
Raghunandan Jun 01 '13 at 5:39
source share