I am able to get the carrier name using the following snippet :
TelephonyManager telephonyManager = ((TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE));
String operatorName = telephonyManager.getNetworkOperatorName();
It works really fine.
I am also able to 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 find out the carrier name / service provider name of an incoming number.
How can I achieve that?
Is that possible to get the incoming number's location, say, for example the country?