3

In Android I need to determine whether an outgoing call has been picked up by the receiver. This does not seem possible as TelephonyManager does not provide that state. Someone else suggested looking at the call history list and checking the duration of the last called number. That's not good because that last called number could have been hours or days ago. Any other suggestions?

Kara
  • 6,115
  • 16
  • 50
  • 57
Johann
  • 27,536
  • 39
  • 165
  • 279

1 Answers1

2

It's not possible because when you start making a call, call state offhook is called and even the ringing time is included even if it's a drop call it's included so can't trust the offhook.

See this link

obtain the last call and screen it by time from that you can get the call durations.

To resolve your doubt.

How Dialer works

It never starts the timer when the reciever has picked up the phone just pick up your phone call a number even before the call is answered you will see the timer started. this is just the time of the offhook state not the time user has picked up a phone or not.

Also you get notified by the network provider about exact time of call and charges not via any app and you can't access that data. If you want just the dialer app then the Drax's answer is close.

Community
  • 1
  • 1
Aashish Bhatnagar
  • 2,595
  • 2
  • 22
  • 37
  • 1
    And yet the Dialer app knows when the caller has picked it up. So if it can figure it out, why can't we? Clearly, there is a way but it's allusive. – Johann Mar 05 '13 at 10:58
  • even the dialer app starts the timer as soon as we dial the number it's the network which provides the exact call duration also we can't access any in all data – Aashish Bhatnagar Mar 05 '13 at 10:59
  • But the dialer app is just another Android app. If it has access to something that indicates the receiver has picked it up, then that must be an API feature. There probably are even apps in Google Play that you can install that replace the Dialer app and still provide that indication. – Johann Mar 05 '13 at 11:02
  • I can resort to the call log but you didn't address the issue as to how the Dialer app is capable of doing it. – Johann Mar 05 '13 at 11:06
  • That's not true. The dialer app knows exactly when the receiver on the other end has been picked up. See this guy's post: http://stackoverflow.com/q/2250455/753632 – Johann Mar 05 '13 at 11:16
  • Don't see the question,see the answers you will find out that I am right . – Aashish Bhatnagar Mar 05 '13 at 11:18
  • I know this very well because I have worked on a call recorder app and I did a lot of research on this topic. – Aashish Bhatnagar Mar 05 '13 at 11:25
  • If the call is never picked up, the call log still logs a duration which indicates the duration of the wait. Therefore, it is not possible even from the call log to distinguish whether someone has picked up the call or not. – Johann Mar 05 '13 at 13:22