In my BroadcastReceiver
I'm trying to detect a missed call.
So I'm checking if the phone goes from EXTRA_STATE_RINGING
to EXTRA_STATE_IDLE
. I'm giving each state a fixed value and checking if a particular value is obtained.
However, the values of the variable are not reflected as I expect them to. I've tried using SharedPreferences
, but I don't think they can be used inside a BroadcastReceiver
. I've tried calling in a different class' object but it's giving me errors.
How can I achieve this? Please help.