The only way I know is to put an observer on the call log:
ContentResolver logObs = getContentResolver();
logObs.registerContentObserver (CallLog.Calls.CONTENT_URI, false,
new ContentObserver (new Handler()) {
public void onChange(boolean selfChange) {
super.onChange(selfChange);
//query the call log, order descending, and see if first
item is a missed call
//take care not to count each missed call more than once
(could happen)
}
});
I haven't tested this in 2.0 but hopefully it still works.
On Nov 1, 9:35 pm, Marc Lester Tan <[email protected]> wrote:
> Hi folks,
>
> anyone have idea how can I make my code receive a "Missed Call" event?
>
> I know I can receive the RINGING state as well as OFFHOOK state via:
>
> TelephonyManager telephony = (TelephonyManager)
> context.getSystemService(Context.TELEPHONY_SERVICE);
> telephony.listen(phoneListener, PhoneStateListener.LISTEN_CALL_STATE);
>
> but what I need to have is to capture the event when the calling party
> terminated the call.
>
> tia,
> Marc
--
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