Android: ContentObserver selfChange
- by mattprecious
Hi,
In the ContentObserver class, the method onChange is passed a boolean selfChange that's defined as: "true if the update was caused by a call to commit on the cursor that is being observed."
What's the proper way to update the cursor so that selfChange is set to true? My current code doesn't reference the cursor at all for an update and selfChange is always false as a result.
ContentValues values = new ContentValues();
values.put("date", date.getTime());
getContentResolver().update(URI, values, "_id = " + id, null);