Detecting new MMS (Android 2.1)
Posted
by Asahi
on Stack Overflow
See other posts from Stack Overflow
or by Asahi
Published on 2010-06-16T19:19:13Z
Indexed on
2010/06/16
19:22 UTC
Read the original article
Hit count: 197
I'd like to recognize arrival of new MMS msg (after it is downloaded to inbox). I am doing the following:
private MMSContentObserver mMmsCO;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
h = new Handler();
mMmsCO = new MMSContentObserver(h);
getContentResolver().registerContentObserver (Uri.parse("content://mms"), true, mMmsCO);
}
where
private class MMSContentObserver extends ContentObserver {
public MMSContentObserver(Handler h) {
super(h);
}
@Override
public boolean deliverSelfNotifications() {
return false;
}
@Override
public void onChange(boolean selfChange) {
super.onChange(selfChange);
}
}
However, onChange is not getting called. What am I missing? Thanks in advance.
© Stack Overflow or respective owner