1. Are you ready for the Galaxy S20? Here is everything we know so far!

How to get outgoing call duration in real time?

Discussion in 'Android Development' started by vovs, Sep 18, 2011.

  1. vovs

    vovs Newbie
    Thread Starter

    Hi, guys!

    Now I write one app and have some problem -
    I need to show real-time outgoing call duration. But I do not know when I should start timer.
    I must start when get answer from other side.
    I tried TelephonyManager.EXTRA_STATE_OFFHOOK -- but it's state is when I press call-button..

    OFFHOOK is the state when call is placed.

    So we should be notified when the call is received.
    How can we get that?

    Can You help me? When I should start count outgoing time?

    Thanks
     


  2. vovs

    vovs Newbie
    Thread Starter

    I think this data produces mobile operator server. And this server return call-duration and current balance after each outgoing call .
    Maybe It's right?

    I can't find any solution, but after each call value of call duration will be stored in db. We can get it by CallLog.Calls.DURATION
    How this value populate field in db?
     
Loading...

Share This Page

Loading...