Hi,

How can I register for SMS database changes?

I tried:
mCursor = mActivity.getContentResolver().query(Sms.CONTENT_URI, new String[] {
                Sms.ADDRESS
        }, null, null, null);


 mCursor.registerDataSetObserver(mydataSetObserver);

where mydataSetObserver is implemented like this:
  private class MyDataSetObserver extends DataSetObserver {
        public void onChanged() {
            System.out.println ("1");
        }
        public void onInvalidated() {
             System.out.println ("2");
        }
}

But when I tried sending a SMS message in the emulator,
MyDataSetObserver never get called.

Can you please tell me why?

Thank you.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to