Detecting outgoing phone call status changes

Inman

Well-Known Member
Licensed User
Longtime User
From a user perspective, when we make an outgoing call, here are the steps involved:

1. Open dialer app and dial a number (or select a contact directly)
2. The contact's phone starts ringing
3. The contact picks up the call
4. After talking for sometime, the call is hung up

I want to detect steps 2 and 3. I believe an outgoing call is detected by listening to the intent android.intent.action.NEW_OUTGOING_CALL. I also see the phone states - IDLE, OFFHOOK, RINGING. I understand OFFHOOK means a call is in progress (and RINGING is only for incoming calls).

But OFFHOOK can mean either step 2 or 3. How can I detect steps 2 and 3 separately?
 

peacemaker

Expert
Licensed User
Longtime User
It's impossible to detect by regular non-system application - no Android API.
It's somehow possible by RIL subsystem, but.... it's for guru programmers, i guess - i could not find a way, but was trying\googling the solution within very long time.
 
Upvote 0
Top