Android : Check whether the phone is dual SIM

前端 未结 8 1956
轻奢々
轻奢々 2020-11-22 01:38

After a lot of research on forums, now I know that there is no way to find IMSI or SIM serial number for both the SIM cards in a dual SIM phone (except for contacting the ma

8条回答
  •  终归单人心
    2020-11-22 01:52

    I am able to read both the IMEI's from OnePlus 2 Phone

     if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
                    TelephonyManager manager = (TelephonyManager) getActivity().getSystemService(Context.TELEPHONY_SERVICE);
                    Log.i(TAG, "Single or Dual Sim " + manager.getPhoneCount());
                    Log.i(TAG, "Default device ID " + manager.getDeviceId());
                    Log.i(TAG, "Single 1 " + manager.getDeviceId(0));
                    Log.i(TAG, "Single 2 " + manager.getDeviceId(1));
                }
    

提交回复
热议问题