How to register for SMS database changes?
<p>How can I register for SMS database changes?</p>

<p>I tried:</p>

<pre><code>mCursor = mActivity.getContentResolver().query(Sms.CONTENT_URI, new String[] {
           Sms.ADDRESS
   }, null, null, null);
mCursor.registerDataSetObserver(mydataSetObserver);
</code></pre>

<p>where mydataSetObserver is implemented like this:</p>

<pre><code> private class MyDataSetObserver extends DataSetObserver {
       public void onChanged() {
           System.out.println ("1");
       }
       public void onInvalidated() {
            System.out.println ("2");
       }
}
</code></pre>

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

<p>Can you please tell me why?</p>

<p>Thank you.</p>
