Hi,
I'm wondering if anyone can point me to an example of using
Cursor::registerContentObserver() or Cursor:: registerDataSetObserver
(). I'm not sure which one to use.
I'll be fetching all the rows in a particular sqlite database table,
the result of which is a Cursor. I'd like to be notified if any record
within that table changes as a result of any other process. It looks
something like:
SQLiteDatabase db = new(...);
Cursor cursor = db.query("tablename", new String[] { "col1",
"col2" }, null, null, null, null, null);
// Now what can we use to listen for changes?
cursor.registerContentObserver(...);
// or
cursor.registerDataSetObserver(...);
If either of those methods will work, does the cursor object need to
remain in memory, or just the registered listeners?
Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---