Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Outgoing call status

Tags:

android

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)
like image 411
Vinayak Bevinakatti Avatar asked Nov 15 '22 13:11

Vinayak Bevinakatti


1 Answers

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.

like image 91
Andras Balázs Lajtha Avatar answered Dec 30 '22 14:12

Andras Balázs Lajtha