Sometimes, I am getting the IMEI of the second SIM SLOT when getting from this code :
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
String imei = telephonyManager.getImei();
return imei;
} else {
String imei = telephonyManager.getDeviceId();
return imei;
}
This is affecting the users where if their deviceId gets changed they will get logged out. Because of the mismatch in the device.
What are the chances of getting IMEI of the second SIM even if I am querying the IMEI of the SIM SLOT 1?
static boolean handleDeviceIdDisplay(Context context, String input) { TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
Hope it helps