简体   繁体   中英

Get the missed call notification

I am developing a application which will determine the phone state such as idle , ringing, off_hook. I am able to differentiate when the user ends the call. If the user doesn't end the call on his own, then obviously it is a missed call. I want to get the notification whenever there is a missed call . I knew that how to get the call logs , but all i want is to get the notification whenever there is a missed call arrives.

我使用布尔变量使用自己的逻辑解决了这个问题。

You need to keep memory of the last state. If you go from idle to ringing and then back to idle, the call is missed.

If you have an "off hook" event in between, the call was taken.

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