I store Android and iOS device tokens in DB. Following are few examples of device tokens getting saved in the DB.
To get IMEI (international mobile equipment identifier) :
public String getIMEI(Activity activity) {
TelephonyManager telephonyManager = (TelephonyManager) activity
.getSystemService(Context.TELEPHONY_SERVICE);
return telephonyManager.getDeviceId();
}
To get device unique id :
public String getDeviceUniqueID(Activity activity){
String device_unique_id = Secure.getString(this.getContentResolver(),
Secure.ANDROID_ID);
return device_unique_id;
}