- selfChange
- True if this is a self-change notification.
- uri
- The Uri of the changed content, or null if unknown.
This method is called when a content change occurs. Includes the changed content Uri when available.
Subclasses should override this method to handle content changes. To ensure correct operation on older versions of the framework that did not provide a Uri argument, applications should also implement the ContentObserver.OnChange(bool) overload of this method whenever they implement the ContentObserver.OnChange(bool, Android.Net.Uri) overload.
Example implementation:
java Example
// Implement the onChange(boolean) method to delegate the change notification to // the onChange(boolean, Uri) method to ensure correct operation on older versions // of the framework that did not have the onChange(boolean, Uri) method. @Override public void onChange(boolean selfChange) { onChange(selfChange, null); } // Implement the onChange(boolean, Uri) method to take advantage of the new Uri argument. @Override public void onChange(boolean selfChange, Uri uri) { // Handle change. }