Forum Xamarin.Android

Broadcast Detect outgoing CallState Xamarin

Hello,

I already success to get the incoming call status, with Android.Telephony.PhoneStateListener OnCallStateChanged event:

     base.OnCallStateChanged(state, incomingNumber);
                switch (state)
                {

                    case CallState.Ringing:
                        // recieve a call ! 
                        _activity.showalert(true, "ringing ! state : " + state.ToString());

                        break;
                    case CallState.Offhook:
                        _activity.showalert(true, "Offhook ! ");

                        break;
                    case CallState.Idle:
                        _activity.showalert(true, "Idle ! " + state.ToString());

                        break;
                }

but can't get how I can get the number that I call state, as I wanna to know if the call is answered, dropped, rejected, !! I made a small research and found that this can be done with broadcast but dont' know how

Thanks in advance for your help

Sign In or Register to comment.