Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

It's possible to get outgoing call duration during call?

Tags:

android

i would get outgoing call duration a call, I thought to get when the persone to the other side answer my call, but with PhoneStateListener we can get the state of a call, but PhoneStateListener changes state to CALL_STATE_OFFHOOK immediately when the outgoing call starts and not when the person to other side answers, so i can't get the effective time of call during a conversation. Any ideas to do this

Thanks in advance!

like image 204
mardvd Avatar asked Oct 18 '10 12:10

mardvd


People also ask

What does outgoing call time mean?

Outgoing - from the time the phone is answered and goes live, OR from the time the voicemail picks up.


1 Answers

I think this is possible simply by spying on the call log. You can query the call log at the end of a call and the duration field will tell you what you want to know.

Here's a nice tutorial. Just add the field CallLog.Calls.DURATION to the array.

http://www.dcpagesapps.com/developer-resources/android/25-android-tutorial-call-logs

I hope this helps.

Emmanuel

like image 159
Emmanuel Avatar answered Oct 29 '22 06:10

Emmanuel