1

I have set up my virtual phone numbers to forward calls on my cell phone. When the call is forwarded, I am receiving the incoming number, but not what number they dialed us to reach.

Is it possible to get the number they dialed us to reach?

public class MyPhoneStateListener extends PhoneStateListener {
  private String[] projection = new String[] {
    People._ID, People.NAME, People.NUMBER
  };
  public void onCallStateChanged(int state,String incomingNumber){
    switch(state)
    {
      case TelephonyManager.CALL_STATE_IDLE:
        Log.d("DEBUG", "IDLE");
      break;
      case TelephonyManager.CALL_STATE_OFFHOOK:
        if(!incomingNumber.equals("")){
          handleCall(incomingCall);
        }
      break;
      case TelephonyManager.CALL_STATE_RINGING:
        Log.d("DEBUG", "RINGING");
      break;
    }
  }
Cœur
  • 37,241
  • 25
  • 195
  • 267
kakopappa
  • 5,023
  • 5
  • 54
  • 73

1 Answers1

0

From what I have learnt, it is only possible to get the incoming number.

kakopappa
  • 5,023
  • 5
  • 54
  • 73