Outgoing Call End Classification

183 Views Asked by At

I just want to know if when an outgoing call ends, we can differentiate and know if it was due to normal hangup (normal call end), or call end due to disconnection (loss of signal, network congestion, or any reason from the carrier)

1

There are 1 best solutions below

0
On

There are two main interfaces to call events depending on whether you are using the standard call app provided or are implementing your own user interface to manage calls.

If you are using the standard call service then you limited to whatever callbacks the Android telephony manager propvides:

This is a fairly limited set of events and I don't think will give you what you are looking for. It will allow you detect that the phone has gone from off hook to idle state, but not why.

If you are implementing the user interface yourself for call control, then you have access to a rusher set of events via the InCallService:

This provides more information in callbacks but it still does not give a 'disconnect reason' for calls, AFAIK.

Note also that to use the InCallService your app must be registered as the default phone app.