I am trying to find out the information of incoming call phone number like Operator,Location of number,Pincode.Please help.
Asked
Active
Viewed 1,452 times
1
-
3Sorry, magic wands are out of stock – Rajesh May 18 '12 at 10:08
-
I think question is already asked check this link http://stackoverflow.com/questions/1853220/retrieve-incoming-calls-phone-number-in-android – aravindKrishna May 18 '12 at 10:10
3 Answers
0
<receiver android:name=".CustomBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
</intent-filter>
</receiver>
</application>
<uses-sdk android:minSdkVersion="5" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
public class CustomPhoneStateListener extends PhoneStateListener {
private static final String TAG = "CustomPhoneStateListener";
public void onCallStateChange(int state, String incomingNumber){
Log.v(TAG, "WE ARE INSIDE!!!!!!!!!!!");
Log.v(TAG, incomingNumber);
switch(state){
case TelephonyManager.CALL_STATE_RINGING:
Log.d(TAG, "RINGING");
break;
}
}
public class CustomBroadcastReceiver extends BroadcastReceiver {
private static final String TAG = "CustomBroadcastReceiver";
@Override
public void onReceive(Context context, Intent intent) {
Log.v(TAG, "WE ARE INSIDE!!!!!!!!!!!");
TelephonyManager telephony = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
CustomPhoneStateListener customPhoneListener = new CustomPhoneStateListener();
telephony.listen(customPhoneListener, PhoneStateListener.LISTEN_CALL_STATE);
Bundle bundle = intent.getExtras();
String phoneNr= bundle.getString("incoming_number");
Log.v(TAG, "phoneNr: "+phoneNr);
}
This may be what you want

Thiru VT
- 831
- 2
- 8
- 24
0
TelephonyManager telephonyManager =((TelephonyManager) Context.getSystemService(Context.TELEPHONY_SERVICE));
String operatorName = telephonyManager.getNetworkOperatorName();
similarly the sim operator can be retrieved by using:
String operatorName = telephonyManager.getSimOperatorName();

Thiru VT
- 831
- 2
- 8
- 24
-
i couldnt find ,atleast remove negative comment on my previous answer – Thiru VT May 18 '12 at 11:38