I am creating one calling app for which I want to show the active ongoing call duration of running call. For ex. If ongoing call is active and let's assume it started at 2:05 pm then I want to show the real time of the active call. Currently I implement it using timer task by reading the call status from AOSP Telephony APIs. But it's having issue when device is booted. So I want to update the current implementation and want a AOSP/SDK platform API or some kind of intent broadcast with which I could read the actual time and update the current active ongoing call duration in my app UI.
Please do let me know if anyone has any idea about platform AOSP API available to achieve this use case in Android.
Thanks in advance.
From what can I see in the AOSP Dialer app UI code, the timer is shown in a
Chronometer (Textview)- calledbottomTimerViewwhich is a part of theContactGridManagerclass.Ref:
Chronometer APIs
Implementation in the dialer app:
This can be referred as a starting point to create an API based on this.