TelephonyManager detect voicemail on outgoing call

1.3k Views Asked by At

thanks again for all the help I have received here!

I have written a Listener that detects when a call has ended. Furthermore I want to detect wheter the receiver picked up or I ended up on the mailbox.

However, I just can't figure out how to it and can't find anything on the internet (probably searching for the wrong term, as is the case most of the time).

Help would be much appreciated.

Thanks again! Chr0n

1

There are 1 best solutions below

0
On
  • Detect when a call has ended is possible: Use PhoneStateListener. A CALL_STATE_IDLE state means hang up.
  • Picked up/dropped call: not possible.

The closest thing would be to look at the call log and figure it out from the call duration. A call duration of zero means the other end didn't pick up the phone. But this is not real time, it's after the fact. Moreover it won't tell you if the person went to voicemail; what if he hung up...

I hope this helps a little bit...