For example I have a dual sim mobile with Airtel and Vodafone sims in it. I would like to know Can we get MCC and MNC of both network providers.
I know that
Using getPhoneCount() We can know, how many sims a device has.
Using getNetworkOperator() we can get MCC+MNC of active network operator.
It was not as easy before, but After Lolipop version you can do this. Here is my Code:
Just Add this code in your on create method after giving permission.
Note: If Your testing this on latest android versions like marshmellow,nougat & oreo then you have to give
checkselfpermission
(Run time Permissions). For Dual Sim checking, View this : Answer