Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Inherited Constants](https://developer.android.com/reference/android/test/mock/MockContentResolver#inhconstants) \| [Ctors](https://developer.android.com/reference/android/test/mock/MockContentResolver#pubctors) \| [Methods](https://developer.android.com/reference/android/test/mock/MockContentResolver#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/test/mock/MockContentResolver#inhmethods)

# MockContentResolver

*** ** * ** ***

` public class MockContentResolver `   
` ` ` extends https://developer.android.com/reference/android/content/ContentResolver ` ` `

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.content.ContentResolver](https://developer.android.com/reference/android/content/ContentResolver) ||
|   | ↳ | android.test.mock.MockContentResolver |

<br />

*** ** * ** ***

<br />

An extension of `https://developer.android.com/reference/android/content/ContentResolver` that is designed for testing.

MockContentResolver overrides Android's normal way of resolving providers by authority. To have access to a provider based on its authority, users of MockContentResolver first instantiate the provider and use `https://developer.android.com/reference/android/test/mock/MockContentResolver#addProvider(java.lang.String,%20android.content.ContentProvider)`. Resolution of an authority occurs entirely within MockContentResolver.

Users can also set an authority's entry in the map to null, so that a provider is completely mocked out.

### Developer Guides

For more information about application testing, read the [Testing](https://developer.android.com/guide/topics/testing) developer guide.

<br />

## Summary

### Inherited constants

From class `https://developer.android.com/reference/android/content/ContentResolver` `https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#ANY_CURSOR_ITEM_TYPE`

This is the Android platform's generic MIME type to match any MIME type of the form "`https://developer.android.com/reference/android/content/ContentResolver#CURSOR_ITEM_BASE_TYPE`/`SUB_TYPE`".
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#CURSOR_DIR_BASE_TYPE`

This is the Android platform's base MIME type for a content: URI containing a Cursor of zero or more items.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#CURSOR_ITEM_BASE_TYPE`

This is the Android platform's base MIME type for a content: URI containing a Cursor of a single item.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#EXTRA_HONORED_ARGS`

Allows provider to report back to client which query keys are honored in a Cursor.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#EXTRA_REFRESH_SUPPORTED`

An extra boolean describing whether a particular provider supports refresh or not.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#EXTRA_SIZE`

An extra `https://developer.android.com/reference/android/graphics/Point` describing the optimal size for a requested image resource, in pixels.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#EXTRA_TOTAL_COUNT`

Added to `https://developer.android.com/reference/android/database/Cursor` extras `https://developer.android.com/reference/android/os/Bundle` to indicate total row count of recordset when paging is supported.
`int` `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_DELETE`

Flag for `https://developer.android.com/reference/android/content/ContentResolver#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20int)`: typically set by a `https://developer.android.com/reference/android/content/ContentProvider` to indicate that this notification is the result of a `https://developer.android.com/reference/android/content/ContentProvider#delete(android.net.Uri,%20android.os.Bundle)` call.
`int` `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_INSERT`

Flag for `https://developer.android.com/reference/android/content/ContentResolver#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20int)`: typically set by a `https://developer.android.com/reference/android/content/ContentProvider` to indicate that this notification is the result of an `https://developer.android.com/reference/android/content/ContentProvider#insert(android.net.Uri,%20android.content.ContentValues)` call.
`int` `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_SKIP_NOTIFY_FOR_DESCENDANTS`

Flag for `https://developer.android.com/reference/android/content/ContentResolver#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20int)`: if set, this notification will be skipped if it is being delivered to the root URI of a ContentObserver that is using "notify for descendants." The purpose of this is to allow the provide to send a general notification of "something under X" changed that observers of that specific URI can receive, while also sending a specific URI under X.
`int` `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_SYNC_TO_NETWORK`

Flag for `https://developer.android.com/reference/android/content/ContentResolver#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20int)`: attempt to sync the change to the network.
`int` `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_UPDATE`

Flag for `https://developer.android.com/reference/android/content/ContentResolver#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20int)`: typically set by a `https://developer.android.com/reference/android/content/ContentProvider` to indicate that this notification is the result of an `https://developer.android.com/reference/android/content/ContentProvider#update(android.net.Uri,%20android.content.ContentValues,%20android.os.Bundle)` call.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_GROUP_COLUMNS`

Specifies the list of columns (stored as a `String[]`) against which to group results.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_LIMIT`

Specifies the max number of rows to include in a Cursor.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_OFFSET`

Specifies the offset row index within a Cursor.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_SORT_COLLATION`

Allows client to specify a hint to the provider declaring which collation to use when sorting values.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_SORT_COLUMNS`

Specifies the list of columns (stored as a `String[]`) against which to sort results.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_SORT_DIRECTION`

Specifies desired sort order.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_SORT_LOCALE`

Allows client to specify a hint to the provider declaring which locale to use when sorting values.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_SQL_GROUP_BY`

Key for an SQL style `GROUP BY` string that may be present in the query Bundle argument passed to `https://developer.android.com/reference/android/content/ContentProvider#query(android.net.Uri,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)`.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_SQL_HAVING`

Key for an SQL style `HAVING` string that may be present in the query Bundle argument passed to `https://developer.android.com/reference/android/content/ContentProvider#query(android.net.Uri,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)`.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_SQL_LIMIT`

Key for an SQL style `LIMIT` string that may be present in the query Bundle argument passed to `https://developer.android.com/reference/android/content/ContentProvider#query(android.net.Uri,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)`.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_SQL_SELECTION`

Key for an SQL style selection string that may be present in the query Bundle argument passed to `https://developer.android.com/reference/android/content/ContentProvider#query(android.net.Uri,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)` when called by a legacy client.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_SQL_SELECTION_ARGS`

Key for SQL selection string arguments list.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_SQL_SORT_ORDER`

Key for an SQL style sort string that may be present in the query Bundle argument passed to `https://developer.android.com/reference/android/content/ContentProvider#query(android.net.Uri,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)` when called by a legacy client.
`int` `https://developer.android.com/reference/android/content/ContentResolver#QUERY_SORT_DIRECTION_ASCENDING`

<br />

`int` `https://developer.android.com/reference/android/content/ContentResolver#QUERY_SORT_DIRECTION_DESCENDING`

<br />

`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#SCHEME_ANDROID_RESOURCE`

<br />

`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#SCHEME_CONTENT`

<br />

`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#SCHEME_FILE`

<br />

`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#SYNC_EXTRAS_ACCOUNT`

*This constant was deprecated in API level 15. instead use `https://developer.android.com/reference/android/content/ContentResolver#requestSync(android.accounts.Account,%20java.lang.String,%20android.os.Bundle)`*
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#SYNC_EXTRAS_DISCARD_LOCAL_DELETIONS`

Indicates that the sync adapter should not proceed with the delete operations, if it determines that there are too many.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#SYNC_EXTRAS_DO_NOT_RETRY`

If this extra is set to true then the request will not be retried if it fails.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#SYNC_EXTRAS_EXPEDITED`

If this extra is set to true, the sync request will be scheduled at the front of the sync request queue, but it is still subject to JobScheduler quota and throttling due to App Standby buckets.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#SYNC_EXTRAS_FORCE`

*This constant was deprecated in API level 15. instead use `https://developer.android.com/reference/android/content/ContentResolver#SYNC_EXTRAS_MANUAL`*
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#SYNC_EXTRAS_IGNORE_BACKOFF`

If this extra is set to true then any backoffs for the initial attempt (e.g. due to retries) are ignored by the sync scheduler.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#SYNC_EXTRAS_IGNORE_SETTINGS`

If this extra is set to true then the sync settings (like getSyncAutomatically()) are ignored by the sync scheduler.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#SYNC_EXTRAS_INITIALIZE`

Set by the SyncManager to request that the SyncAdapter initialize itself for the given account/authority pair.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#SYNC_EXTRAS_MANUAL`

Setting this extra is the equivalent of setting both `https://developer.android.com/reference/android/content/ContentResolver#SYNC_EXTRAS_IGNORE_SETTINGS` and `https://developer.android.com/reference/android/content/ContentResolver#SYNC_EXTRAS_IGNORE_BACKOFF`
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#SYNC_EXTRAS_OVERRIDE_TOO_MANY_DELETIONS`

Indicates that the sync adapter should proceed with the delete operations, even if it determines that there are too many.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#SYNC_EXTRAS_REQUIRE_CHARGING`

If this extra is set to true, the sync request will be scheduled only when the device is plugged in.
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#SYNC_EXTRAS_SCHEDULE_AS_EXPEDITED_JOB`

Run this sync operation as an "expedited job" (see `https://developer.android.com/reference/android/app/job/JobInfo.Builder#setExpedited(boolean)`).
`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/ContentResolver#SYNC_EXTRAS_UPLOAD`

Indicates that this sync is intended to only upload local changes to the server.
`int` `https://developer.android.com/reference/android/content/ContentResolver#SYNC_OBSERVER_TYPE_ACTIVE`

<br />

`int` `https://developer.android.com/reference/android/content/ContentResolver#SYNC_OBSERVER_TYPE_PENDING`

<br />

`int` `https://developer.android.com/reference/android/content/ContentResolver#SYNC_OBSERVER_TYPE_SETTINGS`

<br />

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/test/mock/MockContentResolver#MockContentResolver()() ` Creates a local map of providers. |
| ` https://developer.android.com/reference/android/test/mock/MockContentResolver#MockContentResolver(android.content.Context)(https://developer.android.com/reference/android/content/Context context) ` Creates a local map of providers. |

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/test/mock/MockContentResolver#addProvider(java.lang.String,%20android.content.ContentProvider)(https://developer.android.com/reference/java/lang/String name, https://developer.android.com/reference/android/content/ContentProvider provider) ` Adds access to a provider based on its authority |
| ` void` | ` https://developer.android.com/reference/android/test/mock/MockContentResolver#notifyChange(java.util.Collection<android.net.Uri>,%20android.database.ContentObserver,%20int)(https://developer.android.com/reference/java/util/Collection<https://developer.android.com/reference/android/net/Uri> uris, https://developer.android.com/reference/android/database/ContentObserver observer, int flags) ` Overrides the behavior from the parent class to completely ignore any content notifications sent to this object. |
| ` void` | ` https://developer.android.com/reference/android/test/mock/MockContentResolver#notifyChange(android.net.Uri,%20android.database.ContentObserver)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/android/database/ContentObserver observer) ` Overrides the behavior from the parent class to completely ignore any content notifications sent to this object. |
| ` void` | ` https://developer.android.com/reference/android/test/mock/MockContentResolver#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20int)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/android/database/ContentObserver observer, int flags) ` Overrides the behavior from the parent class to completely ignore any content notifications sent to this object. |
| ` void` | ` https://developer.android.com/reference/android/test/mock/MockContentResolver#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20boolean)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/android/database/ContentObserver observer, boolean syncToNetwork) ` *This method is deprecated. callers should consider migrating to `https://developer.android.com/reference/android/test/mock/MockContentResolver#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20int)`, as it offers support for many more options than just `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_SYNC_TO_NETWORK`.* |

### Inherited methods

From class ` https://developer.android.com/reference/android/content/ContentResolver ` ` final https://developer.android.com/reference/android/content/ContentProviderClient` ` https://developer.android.com/reference/android/content/ContentResolver#acquireContentProviderClient(android.net.Uri)(https://developer.android.com/reference/android/net/Uri uri) `

Returns a `https://developer.android.com/reference/android/content/ContentProviderClient` that is associated with the `https://developer.android.com/reference/android/content/ContentProvider` that services the content at uri, starting the provider if necessary.
` final https://developer.android.com/reference/android/content/ContentProviderClient` ` https://developer.android.com/reference/android/content/ContentResolver#acquireContentProviderClient(java.lang.String)(https://developer.android.com/reference/java/lang/String name) `

Returns a `https://developer.android.com/reference/android/content/ContentProviderClient` that is associated with the `https://developer.android.com/reference/android/content/ContentProvider` with the authority of name, starting the provider if necessary.
` final https://developer.android.com/reference/android/content/ContentProviderClient` ` https://developer.android.com/reference/android/content/ContentResolver#acquireUnstableContentProviderClient(java.lang.String)(https://developer.android.com/reference/java/lang/String name) `

Like `https://developer.android.com/reference/android/content/ContentResolver#acquireContentProviderClient(java.lang.String)`, but for use when you do not trust the stability of the target content provider.
` final https://developer.android.com/reference/android/content/ContentProviderClient` ` https://developer.android.com/reference/android/content/ContentResolver#acquireUnstableContentProviderClient(android.net.Uri)(https://developer.android.com/reference/android/net/Uri uri) `

Like `https://developer.android.com/reference/android/content/ContentResolver#acquireContentProviderClient(android.net.Uri)`, but for use when you do not trust the stability of the target content provider.
` static void` ` https://developer.android.com/reference/android/content/ContentResolver#addPeriodicSync(android.accounts.Account,%20java.lang.String,%20android.os.Bundle,%20long)(https://developer.android.com/reference/android/accounts/Account account, https://developer.android.com/reference/java/lang/String authority, https://developer.android.com/reference/android/os/Bundle extras, long pollFrequency) `

Specifies that a sync should be requested with the specified the account, authority, and extras at the given frequency.
` static https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/android/content/ContentResolver#addStatusChangeListener(int,%20android.content.SyncStatusObserver)(int mask, https://developer.android.com/reference/android/content/SyncStatusObserver callback) `

Request notifications when the different aspects of the SyncManager change.
` https://developer.android.com/reference/android/content/ContentProviderResult` ` https://developer.android.com/reference/android/content/ContentResolver#applyBatch(java.lang.String,%20java.util.ArrayList<android.content.ContentProviderOperation>)(https://developer.android.com/reference/java/lang/String authority, https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/android/content/ContentProviderOperation> operations) `

Applies each of the `https://developer.android.com/reference/android/content/ContentProviderOperation` objects and returns an array of their results.
` final int` ` https://developer.android.com/reference/android/content/ContentResolver#bulkInsert(android.net.Uri,%20android.content.ContentValues[])(https://developer.android.com/reference/android/net/Uri url, https://developer.android.com/reference/android/content/ContentValues values) `

Inserts multiple rows into a table at the given URL.
` final https://developer.android.com/reference/android/os/Bundle` ` https://developer.android.com/reference/android/content/ContentResolver#call(android.net.Uri,%20java.lang.String,%20java.lang.String,%20android.os.Bundle)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String method, https://developer.android.com/reference/java/lang/String arg, https://developer.android.com/reference/android/os/Bundle extras) `

Call a provider-defined method.
` final https://developer.android.com/reference/android/os/Bundle` ` https://developer.android.com/reference/android/content/ContentResolver#call(java.lang.String,%20java.lang.String,%20java.lang.String,%20android.os.Bundle)(https://developer.android.com/reference/java/lang/String authority, https://developer.android.com/reference/java/lang/String method, https://developer.android.com/reference/java/lang/String arg, https://developer.android.com/reference/android/os/Bundle extras) `

<br />

` void` ` https://developer.android.com/reference/android/content/ContentResolver#cancelSync(android.net.Uri)(https://developer.android.com/reference/android/net/Uri uri) `

*This method was deprecated in API level 15. instead use `https://developer.android.com/reference/android/content/ContentResolver#cancelSync(android.accounts.Account,%20java.lang.String)`*
` static void` ` https://developer.android.com/reference/android/content/ContentResolver#cancelSync(android.content.SyncRequest)(https://developer.android.com/reference/android/content/SyncRequest request) `

Remove the specified sync.
` static void` ` https://developer.android.com/reference/android/content/ContentResolver#cancelSync(android.accounts.Account,%20java.lang.String)(https://developer.android.com/reference/android/accounts/Account account, https://developer.android.com/reference/java/lang/String authority) `

Cancel any active or pending syncs that match account and authority.
` final https://developer.android.com/reference/android/net/Uri` ` https://developer.android.com/reference/android/content/ContentResolver#canonicalize(android.net.Uri)(https://developer.android.com/reference/android/net/Uri url) `

Transform the given <var translate="no">url</var> to a canonical representation of its referenced resource, which can be used across devices, persisted, backed up and restored, etc.
` final int` ` https://developer.android.com/reference/android/content/ContentResolver#delete(android.net.Uri,%20java.lang.String,%20java.lang.String[])(https://developer.android.com/reference/android/net/Uri url, https://developer.android.com/reference/java/lang/String where, https://developer.android.com/reference/java/lang/String selectionArgs) `

Deletes row(s) specified by a content URI.
` final int` ` https://developer.android.com/reference/android/content/ContentResolver#delete(android.net.Uri,%20android.os.Bundle)(https://developer.android.com/reference/android/net/Uri url, https://developer.android.com/reference/android/os/Bundle extras) `

Deletes row(s) specified by a content URI.
` static https://developer.android.com/reference/android/content/SyncInfo` ` https://developer.android.com/reference/android/content/ContentResolver#getCurrentSync()() `

*This method was deprecated in API level 15. Since multiple concurrent syncs are now supported you should use `https://developer.android.com/reference/android/content/ContentResolver#getCurrentSyncs()` to get the accurate list of current syncs. This method returns the first item from the list of current syncs or null if there are none.*
` static https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/content/SyncInfo>` ` https://developer.android.com/reference/android/content/ContentResolver#getCurrentSyncs()() `

Returns a list with information about all the active syncs.
` static int` ` https://developer.android.com/reference/android/content/ContentResolver#getIsSyncable(android.accounts.Account,%20java.lang.String)(https://developer.android.com/reference/android/accounts/Account account, https://developer.android.com/reference/java/lang/String authority) `

Check if this account/provider is syncable.
` static boolean` ` https://developer.android.com/reference/android/content/ContentResolver#getMasterSyncAutomatically()() `

Gets the global auto-sync setting that applies to all the providers and accounts.
` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/content/UriPermission>` ` https://developer.android.com/reference/android/content/ContentResolver#getOutgoingPersistedUriPermissions()() `

Return list of all persisted URI permission grants that are hosted by the calling app.
` static https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/content/PeriodicSync>` ` https://developer.android.com/reference/android/content/ContentResolver#getPeriodicSyncs(android.accounts.Account,%20java.lang.String)(https://developer.android.com/reference/android/accounts/Account account, https://developer.android.com/reference/java/lang/String authority) `

Get the list of information about the periodic syncs for the given account and authority.
` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/content/UriPermission>` ` https://developer.android.com/reference/android/content/ContentResolver#getPersistedUriPermissions()() `

Return list of all URI permission grants that have been persisted by the calling app.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/content/ContentResolver#getStreamTypes(android.net.Uri,%20java.lang.String)(https://developer.android.com/reference/android/net/Uri url, https://developer.android.com/reference/java/lang/String mimeTypeFilter) `

Query for the possible MIME types for the representations the given content URL can be returned when opened as as stream with `https://developer.android.com/reference/android/content/ContentResolver#openTypedAssetFileDescriptor(android.net.Uri,%20java.lang.String,%20android.os.Bundle)`.
` static https://developer.android.com/reference/android/content/SyncAdapterType` ` https://developer.android.com/reference/android/content/ContentResolver#getSyncAdapterTypes()() `

Get information about the SyncAdapters that are known to the system.
` static boolean` ` https://developer.android.com/reference/android/content/ContentResolver#getSyncAutomatically(android.accounts.Account,%20java.lang.String)(https://developer.android.com/reference/android/accounts/Account account, https://developer.android.com/reference/java/lang/String authority) `

Check if the provider should be synced when a network tickle is received

This method requires the caller to hold the permission `https://developer.android.com/reference/android/Manifest.permission#READ_SYNC_SETTINGS`.
` final https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/content/ContentResolver#getType(android.net.Uri)(https://developer.android.com/reference/android/net/Uri url) `

Return the MIME type of the given content URL.
` final https://developer.android.com/reference/android/content/ContentResolver.MimeTypeInfo` ` https://developer.android.com/reference/android/content/ContentResolver#getTypeInfo(java.lang.String)(https://developer.android.com/reference/java/lang/String mimeType) `

Return a detailed description of the given MIME type, including an icon and label that describe the type.
` final https://developer.android.com/reference/android/net/Uri` ` https://developer.android.com/reference/android/content/ContentResolver#insert(android.net.Uri,%20android.content.ContentValues,%20android.os.Bundle)(https://developer.android.com/reference/android/net/Uri url, https://developer.android.com/reference/android/content/ContentValues values, https://developer.android.com/reference/android/os/Bundle extras) `

Inserts a row into a table at the given URL.
` final https://developer.android.com/reference/android/net/Uri` ` https://developer.android.com/reference/android/content/ContentResolver#insert(android.net.Uri,%20android.content.ContentValues)(https://developer.android.com/reference/android/net/Uri url, https://developer.android.com/reference/android/content/ContentValues values) `

Inserts a row into a table at the given URL.
` static boolean` ` https://developer.android.com/reference/android/content/ContentResolver#isSyncActive(android.accounts.Account,%20java.lang.String)(https://developer.android.com/reference/android/accounts/Account account, https://developer.android.com/reference/java/lang/String authority) `

Returns true if there is currently a sync operation for the given account or authority actively being processed.
` static boolean` ` https://developer.android.com/reference/android/content/ContentResolver#isSyncPending(android.accounts.Account,%20java.lang.String)(https://developer.android.com/reference/android/accounts/Account account, https://developer.android.com/reference/java/lang/String authority) `

Return true if the pending status is true of any matching authorities.
` https://developer.android.com/reference/android/graphics/Bitmap` ` https://developer.android.com/reference/android/content/ContentResolver#loadThumbnail(android.net.Uri,%20android.util.Size,%20android.os.CancellationSignal)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/android/util/Size size, https://developer.android.com/reference/android/os/CancellationSignal signal) `

Convenience method that efficiently loads a visual thumbnail for the given `https://developer.android.com/reference/android/net/Uri`.
` void` ` https://developer.android.com/reference/android/content/ContentResolver#notifyChange(java.util.Collection<android.net.Uri>,%20android.database.ContentObserver,%20int)(https://developer.android.com/reference/java/util/Collection<https://developer.android.com/reference/android/net/Uri> uris, https://developer.android.com/reference/android/database/ContentObserver observer, int flags) `

Notify registered observers that several rows have been updated.
` void` ` https://developer.android.com/reference/android/content/ContentResolver#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20boolean)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/android/database/ContentObserver observer, boolean syncToNetwork) `

*This method was deprecated in API level 30. callers should consider migrating to `https://developer.android.com/reference/android/content/ContentResolver#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20int)`, as it offers support for many more options than just `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_SYNC_TO_NETWORK`.*
` void` ` https://developer.android.com/reference/android/content/ContentResolver#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20int)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/android/database/ContentObserver observer, int flags) `

Notify registered observers that a row was updated.
` void` ` https://developer.android.com/reference/android/content/ContentResolver#notifyChange(android.net.Uri,%20android.database.ContentObserver)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/android/database/ContentObserver observer) `

Notify registered observers that a row was updated and attempt to sync changes to the network.
` final https://developer.android.com/reference/android/content/res/AssetFileDescriptor` ` https://developer.android.com/reference/android/content/ContentResolver#openAssetFile(android.net.Uri,%20java.lang.String,%20android.os.CancellationSignal)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String mode, https://developer.android.com/reference/android/os/CancellationSignal signal) `

<br />

` final https://developer.android.com/reference/android/content/res/AssetFileDescriptor` ` https://developer.android.com/reference/android/content/ContentResolver#openAssetFileDescriptor(android.net.Uri,%20java.lang.String,%20android.os.CancellationSignal)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String mode, https://developer.android.com/reference/android/os/CancellationSignal cancellationSignal) `

Open a raw file descriptor to access data under a URI.
` final https://developer.android.com/reference/android/content/res/AssetFileDescriptor` ` https://developer.android.com/reference/android/content/ContentResolver#openAssetFileDescriptor(android.net.Uri,%20java.lang.String)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String mode) `

Open a raw file descriptor to access data under a URI.
` final https://developer.android.com/reference/android/os/ParcelFileDescriptor` ` https://developer.android.com/reference/android/content/ContentResolver#openFile(android.net.Uri,%20java.lang.String,%20android.os.CancellationSignal)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String mode, https://developer.android.com/reference/android/os/CancellationSignal signal) `

<br />

` final https://developer.android.com/reference/android/os/ParcelFileDescriptor` ` https://developer.android.com/reference/android/content/ContentResolver#openFileDescriptor(android.net.Uri,%20java.lang.String,%20android.os.CancellationSignal)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String mode, https://developer.android.com/reference/android/os/CancellationSignal cancellationSignal) `

Open a raw file descriptor to access data under a URI.
` final https://developer.android.com/reference/android/os/ParcelFileDescriptor` ` https://developer.android.com/reference/android/content/ContentResolver#openFileDescriptor(android.net.Uri,%20java.lang.String)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String mode) `

Open a raw file descriptor to access data under a URI.
` final https://developer.android.com/reference/java/io/InputStream` ` https://developer.android.com/reference/android/content/ContentResolver#openInputStream(android.net.Uri)(https://developer.android.com/reference/android/net/Uri uri) `

Open a stream on to the content associated with a content URI.
` final https://developer.android.com/reference/java/io/OutputStream` ` https://developer.android.com/reference/android/content/ContentResolver#openOutputStream(android.net.Uri)(https://developer.android.com/reference/android/net/Uri uri) `

Synonym for `https://developer.android.com/reference/android/content/ContentResolver#openOutputStream(android.net.Uri,%20java.lang.String)`.
` final https://developer.android.com/reference/java/io/OutputStream` ` https://developer.android.com/reference/android/content/ContentResolver#openOutputStream(android.net.Uri,%20java.lang.String)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String mode) `

Open a stream on to the content associated with a content URI.
` final https://developer.android.com/reference/android/content/res/AssetFileDescriptor` ` https://developer.android.com/reference/android/content/ContentResolver#openTypedAssetFile(android.net.Uri,%20java.lang.String,%20android.os.Bundle,%20android.os.CancellationSignal)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String mimeTypeFilter, https://developer.android.com/reference/android/os/Bundle opts, https://developer.android.com/reference/android/os/CancellationSignal signal) ` ` final https://developer.android.com/reference/android/content/res/AssetFileDescriptor` ` https://developer.android.com/reference/android/content/ContentResolver#openTypedAssetFileDescriptor(android.net.Uri,%20java.lang.String,%20android.os.Bundle,%20android.os.CancellationSignal)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String mimeType, https://developer.android.com/reference/android/os/Bundle opts, https://developer.android.com/reference/android/os/CancellationSignal cancellationSignal) `

Open a raw file descriptor to access (potentially type transformed) data from a "content:" URI.
` final https://developer.android.com/reference/android/content/res/AssetFileDescriptor` ` https://developer.android.com/reference/android/content/ContentResolver#openTypedAssetFileDescriptor(android.net.Uri,%20java.lang.String,%20android.os.Bundle)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String mimeType, https://developer.android.com/reference/android/os/Bundle opts) `

Open a raw file descriptor to access (potentially type transformed) data from a "content:" URI.
` final https://developer.android.com/reference/android/database/Cursor` ` https://developer.android.com/reference/android/content/ContentResolver#query(android.net.Uri,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String projection, https://developer.android.com/reference/android/os/Bundle queryArgs, https://developer.android.com/reference/android/os/CancellationSignal cancellationSignal) `

Query the given URI, returning a `https://developer.android.com/reference/android/database/Cursor` over the result set with support for cancellation.
` final https://developer.android.com/reference/android/database/Cursor` ` https://developer.android.com/reference/android/content/ContentResolver#query(android.net.Uri,%20java.lang.String[],%20java.lang.String,%20java.lang.String[],%20java.lang.String,%20android.os.CancellationSignal)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String projection, https://developer.android.com/reference/java/lang/String selection, https://developer.android.com/reference/java/lang/String selectionArgs, https://developer.android.com/reference/java/lang/String sortOrder, https://developer.android.com/reference/android/os/CancellationSignal cancellationSignal) `

Query the given URI, returning a `https://developer.android.com/reference/android/database/Cursor` over the result set with optional support for cancellation.
` final https://developer.android.com/reference/android/database/Cursor` ` https://developer.android.com/reference/android/content/ContentResolver#query(android.net.Uri,%20java.lang.String[],%20java.lang.String,%20java.lang.String[],%20java.lang.String)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String projection, https://developer.android.com/reference/java/lang/String selection, https://developer.android.com/reference/java/lang/String selectionArgs, https://developer.android.com/reference/java/lang/String sortOrder) `

Query the given URI, returning a `https://developer.android.com/reference/android/database/Cursor` over the result set.
` final boolean` ` https://developer.android.com/reference/android/content/ContentResolver#refresh(android.net.Uri,%20android.os.Bundle,%20android.os.CancellationSignal)(https://developer.android.com/reference/android/net/Uri url, https://developer.android.com/reference/android/os/Bundle extras, https://developer.android.com/reference/android/os/CancellationSignal cancellationSignal) `

This allows clients to request an explicit refresh of content identified by `uri`.
` final void` ` https://developer.android.com/reference/android/content/ContentResolver#registerContentObserver(android.net.Uri,%20boolean,%20android.database.ContentObserver)(https://developer.android.com/reference/android/net/Uri uri, boolean notifyForDescendants, https://developer.android.com/reference/android/database/ContentObserver observer) `

Register an observer class that gets callbacks when data identified by a given content URI changes.
` void` ` https://developer.android.com/reference/android/content/ContentResolver#releasePersistableUriPermission(android.net.Uri,%20int)(https://developer.android.com/reference/android/net/Uri uri, int modeFlags) `

Relinquish a persisted URI permission grant.
` static void` ` https://developer.android.com/reference/android/content/ContentResolver#removePeriodicSync(android.accounts.Account,%20java.lang.String,%20android.os.Bundle)(https://developer.android.com/reference/android/accounts/Account account, https://developer.android.com/reference/java/lang/String authority, https://developer.android.com/reference/android/os/Bundle extras) `

Remove a periodic sync.
` static void` ` https://developer.android.com/reference/android/content/ContentResolver#removeStatusChangeListener(java.lang.Object)(https://developer.android.com/reference/java/lang/Object handle) `

Remove a previously registered status change listener.
` static void` ` https://developer.android.com/reference/android/content/ContentResolver#requestSync(android.accounts.Account,%20java.lang.String,%20android.os.Bundle)(https://developer.android.com/reference/android/accounts/Account account, https://developer.android.com/reference/java/lang/String authority, https://developer.android.com/reference/android/os/Bundle extras) `

Start an asynchronous sync operation.
` static void` ` https://developer.android.com/reference/android/content/ContentResolver#requestSync(android.content.SyncRequest)(https://developer.android.com/reference/android/content/SyncRequest request) `

Register a sync with the SyncManager.
` static void` ` https://developer.android.com/reference/android/content/ContentResolver#setIsSyncable(android.accounts.Account,%20java.lang.String,%20int)(https://developer.android.com/reference/android/accounts/Account account, https://developer.android.com/reference/java/lang/String authority, int syncable) `

Set whether this account/provider is syncable.
` static void` ` https://developer.android.com/reference/android/content/ContentResolver#setMasterSyncAutomatically(boolean)(boolean sync) `

Sets the global auto-sync setting that applies to all the providers and accounts.
` static void` ` https://developer.android.com/reference/android/content/ContentResolver#setSyncAutomatically(android.accounts.Account,%20java.lang.String,%20boolean)(https://developer.android.com/reference/android/accounts/Account account, https://developer.android.com/reference/java/lang/String authority, boolean sync) `

Set whether or not the provider is synced when it receives a network tickle.
` void` ` https://developer.android.com/reference/android/content/ContentResolver#startSync(android.net.Uri,%20android.os.Bundle)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/android/os/Bundle extras) `

*This method was deprecated in API level 15. instead use `https://developer.android.com/reference/android/content/ContentResolver#requestSync(android.accounts.Account,%20java.lang.String,%20android.os.Bundle)`*
` void` ` https://developer.android.com/reference/android/content/ContentResolver#takePersistableUriPermission(android.net.Uri,%20int)(https://developer.android.com/reference/android/net/Uri uri, int modeFlags) `

Take a persistable URI permission grant that has been offered.
` final https://developer.android.com/reference/android/net/Uri` ` https://developer.android.com/reference/android/content/ContentResolver#uncanonicalize(android.net.Uri)(https://developer.android.com/reference/android/net/Uri url) `

Given a canonical Uri previously generated by `https://developer.android.com/reference/android/content/ContentResolver#canonicalize(android.net.Uri)`, convert it to its local non-canonical form.
` final void` ` https://developer.android.com/reference/android/content/ContentResolver#unregisterContentObserver(android.database.ContentObserver)(https://developer.android.com/reference/android/database/ContentObserver observer) `

Unregisters a change observer.
` final int` ` https://developer.android.com/reference/android/content/ContentResolver#update(android.net.Uri,%20android.content.ContentValues,%20android.os.Bundle)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/android/content/ContentValues values, https://developer.android.com/reference/android/os/Bundle extras) `

Update row(s) in a content URI.
` final int` ` https://developer.android.com/reference/android/content/ContentResolver#update(android.net.Uri,%20android.content.ContentValues,%20java.lang.String,%20java.lang.String[])(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/android/content/ContentValues values, https://developer.android.com/reference/java/lang/String where, https://developer.android.com/reference/java/lang/String selectionArgs) `

Update row(s) in a content URI.
` static void` ` https://developer.android.com/reference/android/content/ContentResolver#validateSyncExtrasBundle(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle extras) `

Check that only values of the following types are in the Bundle:

- Integer
- Long
- Boolean
- Float
- Double
- String
- Account
- null

<br />

` static https://developer.android.com/reference/android/content/ContentResolver` ` https://developer.android.com/reference/android/content/ContentResolver#wrap(android.content.ContentProviderClient)(https://developer.android.com/reference/android/content/ContentProviderClient wrapped) `

Create a `https://developer.android.com/reference/android/content/ContentResolver` instance that redirects all its methods to the given `https://developer.android.com/reference/android/content/ContentProviderClient`.
` static https://developer.android.com/reference/android/content/ContentResolver` ` https://developer.android.com/reference/android/content/ContentResolver#wrap(android.content.ContentProvider)(https://developer.android.com/reference/android/content/ContentProvider wrapped) `

Create a `https://developer.android.com/reference/android/content/ContentResolver` instance that redirects all its methods to the given `https://developer.android.com/reference/android/content/ContentProvider`.
From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public constructors

### MockContentResolver

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public MockContentResolver ()
```

Creates a local map of providers. This map is used instead of the global map when an API call tries to acquire a provider.

<br />

### MockContentResolver

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public MockContentResolver (Context context)
```

Creates a local map of providers. This map is used instead of the global map when an API call tries to acquire a provider.

<br />

| Parameters ||
|---|---|
| `context` | `Context` <br /> |

## Public methods

### addProvider

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addProvider (String name, 
                ContentProvider provider)
```

Adds access to a provider based on its authority

<br />

| Parameters ||
|---|---|
| `name` | `String`: The authority name associated with the provider. <br /> |
| `provider` | `ContentProvider`: An instance of `https://developer.android.com/reference/android/content/ContentProvider` or one of its subclasses, or null. <br /> |

### notifyChange

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void notifyChange (Collection<Uri> uris, 
                ContentObserver observer, 
                int flags)
```

Overrides the behavior from the parent class to completely ignore any content notifications sent to this object. This effectively hides clients from observers elsewhere in the system.

<br />

| Parameters ||
|---|---|
| `uris` | `Collection`: This value cannot be `null`. <br /> |
| `observer` | `ContentObserver`: This value may be `null`. <br /> |
| `flags` | `int`: Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_SYNC_TO_NETWORK` - `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_SKIP_NOTIFY_FOR_DESCENDANTS` - `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_INSERT` - `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_UPDATE` - `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_DELETE` |

### notifyChange

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void notifyChange (Uri uri, 
                ContentObserver observer)
```

Overrides the behavior from the parent class to completely ignore any content notifications sent to this object. This effectively hides clients from observers elsewhere in the system.

<br />

| Parameters ||
|---|---|
| `uri` | `Uri`: This value cannot be `null`. <br /> |
| `observer` | `ContentObserver`: This value may be `null`. <br /> |

### notifyChange

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void notifyChange (Uri uri, 
                ContentObserver observer, 
                int flags)
```

Overrides the behavior from the parent class to completely ignore any content notifications sent to this object. This effectively hides clients from observers elsewhere in the system.

<br />

| Parameters ||
|---|---|
| `uri` | `Uri`: This value cannot be `null`. <br /> |
| `observer` | `ContentObserver`: This value may be `null`. <br /> |
| `flags` | `int`: Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_SYNC_TO_NETWORK` - `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_SKIP_NOTIFY_FOR_DESCENDANTS` - `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_INSERT` - `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_UPDATE` - `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_DELETE` |

### notifyChange

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void notifyChange (Uri uri, 
                ContentObserver observer, 
                boolean syncToNetwork)
```

<br />

**This method is deprecated.**   

callers should consider migrating to `https://developer.android.com/reference/android/test/mock/MockContentResolver#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20int)`, as it offers support for many more options than just `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_SYNC_TO_NETWORK`.

Overrides the behavior from the parent class to completely ignore any content notifications sent to this object. This effectively hides clients from observers elsewhere in the system.

<br />

| Parameters ||
|---|---|
| `uri` | `Uri`: This value cannot be `null`. <br /> |
| `observer` | `ContentObserver`: This value may be `null`. <br /> |
| `syncToNetwork` | `boolean`: If true, same as `https://developer.android.com/reference/android/content/ContentResolver#NOTIFY_SYNC_TO_NETWORK`. <br /> |