notificationUris property

  1. @RequiresApiOr(29, "If set on lower API, only the first entry will be used")
List<String>? notificationUris
final

A list of URIs to watch the content changes.

Typically it should match with the URI of some resource of your content provider, that matches this Cursor's content.

This is needed so the receiver of the cursor could observe changes, and re-request the data, if they want.

Speaking in detail, this is needed so that ContentObservers, registered with NativeCursor.registerContentObserver, would receive updates from AndroidContentResolver.notifyChange, which AndroidContentProvider implementation might call when some of its content changes.

If you provide an invalid notification URI, the system will throw a security exception

java.lang.SecurityException: Failed to find provider null for user 0; expected to find a valid ContentProvider for this authority

Implementation

@RequiresApiOr(29, "If set on lower API, only the first entry will be used")
final List<String>? notificationUris;