Search code examples
androidandroid-contentproviderandroid-contentresolver

Does the ContentResolver notify all path variants?


My content uri has a path depending on the content, e.g. content://controller/ContentItem/0/Favorites/RecentlyPlayed

I observed that when I insert something with this uri all other uris with a shorter path also be notified.

Example

I insert something at:

content://controller/ContentItem/0/Favorites/RecentlyPlayed

also notified:

content://controller/ContentItem/0/Favorites
content://controller/ContentItem/0
content://controller/ContentItem

Is this the usual behavior?

Ralph


Solution

  • Yes if you passed true for notifyForDescendents when registering that observer