My Query is, I want to get notified if the receiver at the other side picks my call when I am making an outgoing call. Is it possible with the Android SDK.
The onCallStateChanged Function is called only when the Person dial a number(OFFHOOK), from his phone and When the call reciever person disconnects the call(IDLE), but there is no State parameter to knowthat, does the other end person has recieved the call?
public class MyPhoneStateListener extends PhoneStateListener{
public void onCallStateChanged(int state,String incomingNumber){
Log.d("Checking---->",TelephonyManager.ACTION_PHONE_STATE_CHANGED);
}
}
Logcat give only the following information when call recieved at the other side:
01-19 19:33:30.633: DEBUG/CallNotifier(638): stopRing()... (OFFHOOK state)
01-19 19:33:30.662: DEBUG/Ringer(638): stopRing()...
01-19 19:33:30.694: DEBUG/Ringer(638): - stopRing: null mRingHandler!
01-19 19:33:31.256: DEBUG/PhoneApp(638): updateWakeState: callscreen true, dialer false, speaker false...
01-19 19:33:31.287: DEBUG/PhoneApp(638): updateWakeState: keepScreenOn = false (isRinging false, showingDisc false)
I'm having the same problem. I use PhoneStateListener for incoming calls, it works well. But for outgoing calls I was only able to register a BroadcastReceiver to the intent android.intent.action.NEW_OUTGOING_CALL.
In my knowledge there is no way to determine weather the other side has picked up, or not. However you can use CallLog to retrieve call information offline. Detailed call state events are only available through the internal class com.android.internal.telephony.Phone which you won't have access to unless you compile your own Andoid.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With