Reputation: 6687
How to capture a missed call event in Android?. The notification bar can show the missed call. Using telephony manager and phone state listener, its possible to read the phone state as IDLE, RINGING and OFFHOOK. But how to know whether it was a missed call?. Please help
Upvotes: 4
Views: 4498
Reputation: 33792
I dont think you get any notifications for missed calls.
You can get events of ACTION_PHONE_STATE_CHANGED
from
keep a track of events in this order
EXTRA_STATE_RINGING
to EXTRA_STATE_OFFHOOK
to EXTRA_STATE_IDLE
Then check CallLog and get your missed call details from there.
Upvotes: 0
Reputation: 2920
set a different flag variable for RINGING and OFFHOOK.
Check the flag when the phone comes to IDLE in the phone state listener.
make sure you have a keydown listener for call cut button ..
if the flag is set for RINGING and Free from call cut then its a miss call...
this is just a list of methods.. the library supports the function for phone listener and keydown methods.
Upvotes: 1