Android: ContentObserver selfChange

Posted by mattprecious on Stack Overflow See other posts from Stack Overflow or by mattprecious
Published on 2010-11-26T20:44:49Z Indexed on 2010/12/24 1:54 UTC
Read the original article Hit count: 607

Filed under:

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);

© Stack Overflow or respective owner

Related posts about android