简体   繁体   中英

telprompt - can I get the call duration?

I am trying to make a call through the telpromt command to return to my application after it makes a call:

NSString *telno = @"telprompt://121,,,,14";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:telno]];

Is there any way to calculate call duration in all situations from my app?

Save a NSDate when your app is receiving the applicationWillResignActive , this will be the start of the call. Then in the applicationDidBecomeActive calculate the difference between the saved NSDate and current date. This will give you an rough estimate of the time the call lasted.

Closer than this you will never be able to come.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM