Get operator details for dual SIM android phone

onkar picture onkar · Mar 4, 2014 · Viewed 10k times · Source

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.

Answer

Ana Llera picture Ana Llera · Jul 16, 2014

Try this, works for me:

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