2008/9/5 android_dev <[EMAIL PROTECTED]> > > Hi.. > > I would like to have a phone state listener for missed calls. I am > looking at the PhoneStateListener. However, the TelephonyManager does > not define a listen state constant for MISSED CALL.
This is because "missed" is a property of call, and PhoneStateListener constants which start with CALL_ are only for phone states. Name is a bit confusing though... > > > I have a phone state listener and simulated a missed call from > incomingphone# using DDMS. The sequence of the method calls > onCallStateChanged(int state, String incomingNumber) for a missed call > looks like this: > > 1 (CALL_STATE_RINGING), incomingphone# > 0 (CALL_STATE_IDLE), incomingphone# > > Is this sequence good enough to know that there is a missed call from > incomingphone#? I am not sure but if you just want to look for missed calls, you should query the CallLogs provider: http://code.google.com/android/reference/android/provider/CallLog.Calls.html#MISSED_TYPE > > I'm wondering how the Android phone app knows about a missed call and > puts a notification in the status bar. Any ideas? Phone app uses some internal APIs which are not in the SDK. > > > > > --~--~---------~--~----~------------~-------~--~----~ 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] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

