Can anyone tell me how to fetch the device Id for above api 21 .. i want to fetch both the device id if its dual sim ??
Currently I am using below code
public static String getImeiNumber(Context context) {
try {
if (context != null) {
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
if (telephonyManager != null) {
Log.d(TAG, "Device ID" + telephonyManager.getDeviceId());
return telephonyManager.getDeviceId();
}
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
and also above marshmallow how can i get the device ID WITH DUAL SIM ???