I can get the name of the carrier using the following snippet:
TelephonyManager telephonyManager = ((TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE)); String operatorName = telephonyManager.getNetworkOperatorName();
This works great.
I can also get the incoming call number using the following snippet:
private final PhoneStateListener phoneStateListener = new PhoneStateListener() { @Override public void onCallStateChanged(int state, String incomingNumber) { String callState = "UNKNOWN"; switch (state) { case TelephonyManager.CALL_STATE_RINGING: } } }
I want to know the name of the provider / name of the service provider of the incoming number. How can i achieve this?
Is it possible to get an input number, for example, a country?
android telephonymanager
Rethinavel pillai
source share