Search code examples
androidimeidual-sim

Get operator details for dual SIM android phone


I am working on an app where I need details of user's SIM his phone number, imei number and operator . so far I have achieved his IMEI's numbers refering this answer, is his device single sim or dual SIM. How do I get his number of both the SIM and the name of operator for both the connections.


Solution

  • Try this, works for me:

    TelephonyManager manager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
    String carrierName = manager.getNetworkOperatorName();