Question

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.

Was it helpful?

Solution

I solved this using my own logic, by using the boolean variables.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top