onkar onkar - 7 months ago 58
Android Question

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.

Ana Ana

Try this, works for me:

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