My application requests a notification whenever a call is made or
ended. I'm using the TelephonyManager class in my Activity's onCreate
method:
TelephonyManager mgr = (TelephonyManager)
getSystemService(Context.TELEPHONY_SERVICE);
mgr.listen(new PhoneStateListener() {
public void onCallStateChanged(int state, String incomingNumber) {
/* respond to a phone call initiation or termination */
}
}, PhoneStateListener.LISTEN_CALL_STATE);
The problem I'm having is that as soon as the listen method is called,
the onCallStateChanged method in the listener receives an event, even
though the call state hasn't actually changed.
Any help is greatly appreciated.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en