Programmatically retrieve IMEI number for dual SIM in android

后端 未结 12 1175
一生所求
一生所求 2020-12-05 15:19

For single SIM following code works:

TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
String imei= tm.getDeviceId();
12条回答
  •  难免孤独
    2020-12-05 16:10

    AFAIK it is not possible. The java reflection, you used could work for some devices but not all. However there might be some manufacturer specific API's that allows for this.

    Quoting Commonsware,

    Android does not support multiple SIMs, at least from the SDK. Device manufacturers who have created multi-SIM devices are doing so on their own. You are welcome to contact your device manufacturer and see if they have an SDK add-on or something that allows you to access the second SIM.

提交回复
热议问题