# MockContentResolver

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

# MockContentResolver

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/test/mock/MockContentResolver "View this page in Java")  

```
open class MockContentResolver : ContentResolver
```

|---|---|--------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                    |||
| ↳ | [android.content.ContentResolver](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#)           ||
|   | ↳ | [android.test.mock.MockContentResolver](https://developer.android.com/reference/kotlin/android/test/mock/MockContentResolver#) |

An extension of[android.content.ContentResolver](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#)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[MockContentResolver.addProvider(String, ContentProvider)](https://developer.android.com/reference/kotlin/android/test/mock/MockContentResolver#addProvider(kotlin.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/index.html)developer guide.

## Summary

| Inherited constants ||
|---|---|
| From class[ContentResolver](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#) |----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [ANY_CURSOR_ITEM_TYPE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#ANY_CURSOR_ITEM_TYPE:kotlin.String) <br /> This is the Android platform's generic MIME type to match any MIME type of the form "[CURSOR_ITEM_BASE_TYPE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#CURSOR_ITEM_BASE_TYPE:kotlin.String)/`SUB_TYPE`".`SUB_TYPE`is the sub-type of the application-dependent content, e.g., "audio", "video", "playlist". <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CURSOR_DIR_BASE_TYPE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#CURSOR_DIR_BASE_TYPE:kotlin.String) <br /> This is the Android platform's base MIME type for a content: URI containing a Cursor of zero or more items. Applications should use this as the base type along with their own sub-type of their content: URIs that represent a directory of items. For example, hypothetical IMAP email client may have a URI`content://com.company.provider.imap/inbox`for all of the messages in its inbox, whose MIME type would be reported as`CURSOR_DIR_BASE_TYPE + "/vnd.company.imap-msg"` Note how the base MIME type varies between this and[CURSOR_ITEM_BASE_TYPE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#CURSOR_ITEM_BASE_TYPE:kotlin.String)depending on whether there is one single item or multiple items in the data set, while the sub-type remains the same because in either case the data structure contained in the cursor is the same. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CURSOR_ITEM_BASE_TYPE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#CURSOR_ITEM_BASE_TYPE:kotlin.String) <br /> This is the Android platform's base MIME type for a content: URI containing a Cursor of a single item. Applications should use this as the base type along with their own sub-type of their content: URIs that represent a particular item. For example, hypothetical IMAP email client may have a URI`content://com.company.provider.imap/inbox/1`for a particular message in the inbox, whose MIME type would be reported as`CURSOR_ITEM_BASE_TYPE + "/vnd.company.imap-msg"` Compare with[CURSOR_DIR_BASE_TYPE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#CURSOR_DIR_BASE_TYPE:kotlin.String). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [EXTRA_HONORED_ARGS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#EXTRA_HONORED_ARGS:kotlin.String) <br /> Allows provider to report back to client which query keys are honored in a Cursor. Key identifying a`String[]`containing all QUERY_ARG_SORT\* arguments honored by the provider. Include this in[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)extras[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)when any QUERY_ARG_SORT\* value was honored during the preparation of the results[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#). If present, ALL honored arguments are enumerated in this extra's payload. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [EXTRA_REFRESH_SUPPORTED](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#EXTRA_REFRESH_SUPPORTED:kotlin.String) <br /> An extra boolean describing whether a particular provider supports refresh or not. If a provider supports refresh, it should include this key in its returned Cursor as part of its query call. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [EXTRA_SIZE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#EXTRA_SIZE:kotlin.String) <br /> An extra[Point](https://developer.android.com/reference/kotlin/android/graphics/Point.html#)describing the optimal size for a requested image resource, in pixels. If a provider has multiple sizes of the image, it should return the image closest to this size. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [EXTRA_TOTAL_COUNT](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#EXTRA_TOTAL_COUNT:kotlin.String) <br /> Added to[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)extras[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)to indicate total row count of recordset when paging is supported. Providers must include this when implementing paging support. A provider may return -1 that row count of the recordset is unknown. Providers having returned -1 in a previous query are recommended to send content change notification once (if) full recordset size becomes known. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [NOTIFY_DELETE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#NOTIFY_DELETE:kotlin.Int) <br /> Flag for[notifyChange(android.net.Uri,android.database.ContentObserver,int)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20kotlin.Int)): typically set by a[ContentProvider](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#)to indicate that this notification is the result of a android.content.ContentProvider#delete call. Sending these detailed flags are optional, but providers are strongly recommended to send them. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [NOTIFY_INSERT](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#NOTIFY_INSERT:kotlin.Int) <br /> Flag for[notifyChange(android.net.Uri,android.database.ContentObserver,int)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20kotlin.Int)): typically set by a[ContentProvider](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#)to indicate that this notification is the result of an android.content.ContentProvider#insert call. Sending these detailed flags are optional, but providers are strongly recommended to send them. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [NOTIFY_SKIP_NOTIFY_FOR_DESCENDANTS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#NOTIFY_SKIP_NOTIFY_FOR_DESCENDANTS:kotlin.Int) <br /> Flag for[notifyChange(android.net.Uri,android.database.ContentObserver,int)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20kotlin.Int)): 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. It would use this flag when sending the former, so that observers of "X and descendants" only see the latter. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [NOTIFY_SYNC_TO_NETWORK](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#NOTIFY_SYNC_TO_NETWORK:kotlin.Int) <br /> Flag for[notifyChange(android.net.Uri,android.database.ContentObserver,int)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20kotlin.Int)): attempt to sync the change to the network. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [NOTIFY_UPDATE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#NOTIFY_UPDATE:kotlin.Int) <br /> Flag for[notifyChange(android.net.Uri,android.database.ContentObserver,int)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20kotlin.Int)): typically set by a[ContentProvider](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#)to indicate that this notification is the result of an android.content.ContentProvider#update call. Sending these detailed flags are optional, but providers are strongly recommended to send them. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [QUERY_ARG_GROUP_COLUMNS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_ARG_GROUP_COLUMNS:kotlin.String) <br /> Specifies the list of columns (stored as a`String[]`) against which to group results. When column values are identical, multiple records are collapsed together into a single record. Columns present in this list must also be included in the projection supplied to[ContentResolver.query(Uri, String[], Bundle, CancellationSignal)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#query(android.net.Uri,%20kotlin.Array,%20android.os.Bundle,%20android.os.CancellationSignal)). Apps targeting[android.os.Build.VERSION_CODES#R](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#R:kotlin.Int)or higher: - [ContentProvider](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#)implementations: When preparing data in[ContentProvider.query(Uri, String[], Bundle, CancellationSignal)](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#query(android.net.Uri,%20kotlin.Array,%20android.os.Bundle,%20android.os.CancellationSignal)), if group columns is reflected in the returned Cursor, it is strongly recommended that[QUERY_ARG_SORT_COLUMNS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_ARG_SORT_COLUMNS:kotlin.String)then be included in the array of honored arguments reflected in[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)extras[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)under[EXTRA_HONORED_ARGS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#EXTRA_HONORED_ARGS:kotlin.String). - When querying a provider, where no QUERY_ARG_SQL\* otherwise exists in the arguments[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#), the Content framework will attempt to synthesize an QUERY_ARG_SQL\* argument using the corresponding QUERY_ARG_SORT\* values.      | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [QUERY_ARG_LIMIT](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_ARG_LIMIT:kotlin.String) <br /> Specifies the max number of rows to include in a Cursor. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [QUERY_ARG_OFFSET](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_ARG_OFFSET:kotlin.String) <br /> Specifies the offset row index within a Cursor. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [QUERY_ARG_SORT_COLLATION](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_ARG_SORT_COLLATION:kotlin.String) <br /> Allows client to specify a hint to the provider declaring which collation to use when sorting values. Providers may support custom collators. When specifying a custom collator the value is determined by the Provider. [ContentProvider](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#)implementations: When preparing data in[ContentProvider.query(Uri, String[], Bundle, CancellationSignal)](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#query(android.net.Uri,%20kotlin.Array,%20android.os.Bundle,%20android.os.CancellationSignal)), if sort collation is reflected in the returned Cursor, it is strongly recommended that[QUERY_ARG_SORT_COLLATION](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_ARG_SORT_COLLATION:kotlin.String)then be included in the array of honored arguments reflected in[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)extras[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)under[EXTRA_HONORED_ARGS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#EXTRA_HONORED_ARGS:kotlin.String). When querying a provider, where no QUERY_ARG_SQL\* otherwise exists in the arguments[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#), the Content framework will attempt to synthesize a QUERY_ARG_SQL\* argument using the corresponding QUERY_ARG_SORT\* values. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [QUERY_ARG_SORT_COLUMNS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_ARG_SORT_COLUMNS:kotlin.String) <br /> Specifies the list of columns (stored as a`String[]`) against which to sort results. When first column values are identical, records are then sorted based on second column values, and so on. Columns present in this list must also be included in the projection supplied to[ContentResolver.query(Uri, String[], Bundle, CancellationSignal)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#query(android.net.Uri,%20kotlin.Array,%20android.os.Bundle,%20android.os.CancellationSignal)). Apps targeting[android.os.Build.VERSION_CODES#O](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#O:kotlin.Int)or higher: - [ContentProvider](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#)implementations: When preparing data in[ContentProvider.query(Uri, String[], Bundle, CancellationSignal)](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#query(android.net.Uri,%20kotlin.Array,%20android.os.Bundle,%20android.os.CancellationSignal)), if sort columns is reflected in the returned Cursor, it is strongly recommended that[QUERY_ARG_SORT_COLUMNS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_ARG_SORT_COLUMNS:kotlin.String)then be included in the array of honored arguments reflected in[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)extras[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)under[EXTRA_HONORED_ARGS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#EXTRA_HONORED_ARGS:kotlin.String). - When querying a provider, where no QUERY_ARG_SQL\* otherwise exists in the arguments[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#), the Content framework will attempt to synthesize a QUERY_ARG_SQL\* argument using the corresponding QUERY_ARG_SORT\* values. | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [QUERY_ARG_SORT_DIRECTION](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_ARG_SORT_DIRECTION:kotlin.String) <br /> Specifies desired sort order. When unspecified a provider may provide a default sort direction, or choose to return unsorted results. Apps targeting[android.os.Build.VERSION_CODES#O](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#O:kotlin.Int)or higher: - [ContentProvider](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#)implementations: When preparing data in[ContentProvider.query(Uri, String[], Bundle, CancellationSignal)](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#query(android.net.Uri,%20kotlin.Array,%20android.os.Bundle,%20android.os.CancellationSignal)), if sort direction is reflected in the returned Cursor, it is strongly recommended that[QUERY_ARG_SORT_DIRECTION](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_ARG_SORT_DIRECTION:kotlin.String)then be included in the array of honored arguments reflected in[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)extras[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)under[EXTRA_HONORED_ARGS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#EXTRA_HONORED_ARGS:kotlin.String). - When querying a provider, where no QUERY_ARG_SQL\* otherwise exists in the arguments[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#), the Content framework will attempt to synthesize a QUERY_ARG_SQL\* argument using the corresponding QUERY_ARG_SORT\* values.                                                                                                                                                                                                                                                                                                                                                                                      | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [QUERY_ARG_SORT_LOCALE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_ARG_SORT_LOCALE:kotlin.String) <br /> Allows client to specify a hint to the provider declaring which locale to use when sorting values. The value is defined as a RFC 3066 locale ID followed by an optional keyword list, which is the locale format used to configure ICU through classes like[android.icu.util.ULocale](https://developer.android.com/reference/kotlin/android/icu/util/ULocale.html#). This supports requesting advanced sorting options, such as`de@collation=phonebook`,`zh@collation=pinyin`, etc. [ContentProvider](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#)implementations: When preparing data in[ContentProvider.query(Uri, String[], Bundle, CancellationSignal)](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#query(android.net.Uri,%20kotlin.Array,%20android.os.Bundle,%20android.os.CancellationSignal)), if sort locale is reflected in the returned Cursor, it is strongly recommended that[QUERY_ARG_SORT_LOCALE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_ARG_SORT_LOCALE:kotlin.String)then be included in the array of honored arguments reflected in[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)extras[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)under[EXTRA_HONORED_ARGS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#EXTRA_HONORED_ARGS:kotlin.String). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [QUERY_ARG_SQL_GROUP_BY](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_ARG_SQL_GROUP_BY:kotlin.String) <br /> Key for an SQL style`GROUP BY`string that may be present in the query Bundle argument passed to[ContentProvider.query(Uri, String[], Bundle, CancellationSignal)](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#query(android.net.Uri,%20kotlin.Array,%20android.os.Bundle,%20android.os.CancellationSignal)). **Apps targeting[android.os.Build.VERSION_CODES#O](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#O:kotlin.Int)or higher are strongly encourage to use structured query arguments in lieu of opaque SQL query clauses.** <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [QUERY_ARG_SQL_HAVING](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_ARG_SQL_HAVING:kotlin.String) <br /> Key for an SQL style`HAVING`string that may be present in the query Bundle argument passed to[ContentProvider.query(Uri, String[], Bundle, CancellationSignal)](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#query(android.net.Uri,%20kotlin.Array,%20android.os.Bundle,%20android.os.CancellationSignal)). **Apps targeting[android.os.Build.VERSION_CODES#O](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#O:kotlin.Int)or higher are strongly encourage to use structured query arguments in lieu of opaque SQL query clauses.** <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [QUERY_ARG_SQL_LIMIT](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_ARG_SQL_LIMIT:kotlin.String) <br /> Key for an SQL style`LIMIT`string that may be present in the query Bundle argument passed to[ContentProvider.query(Uri, String[], Bundle, CancellationSignal)](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#query(android.net.Uri,%20kotlin.Array,%20android.os.Bundle,%20android.os.CancellationSignal)). **Apps targeting[android.os.Build.VERSION_CODES#O](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#O:kotlin.Int)or higher are strongly encourage to use structured query arguments in lieu of opaque SQL query clauses.** <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [QUERY_ARG_SQL_SELECTION](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_ARG_SQL_SELECTION:kotlin.String) <br /> Key for an SQL style selection string that may be present in the query Bundle argument passed to[ContentProvider.query(Uri, String[], Bundle, CancellationSignal)](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#query(android.net.Uri,%20kotlin.Array,%20android.os.Bundle,%20android.os.CancellationSignal))when called by a legacy client. Clients should never include user supplied values directly in the selection string, as this presents an avenue for SQL injection attacks. In lieu of this, a client should use standard placeholder notation to represent values in a selection string, then supply a corresponding value in {@value #QUERY_ARG_SQL_SELECTION_ARGS}. **Apps targeting[android.os.Build.VERSION_CODES#O](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#O:kotlin.Int)or higher are strongly encourage to use structured query arguments in lieu of opaque SQL query clauses.** <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [QUERY_ARG_SQL_SELECTION_ARGS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_ARG_SQL_SELECTION_ARGS:kotlin.String) <br /> Key for SQL selection string arguments list. Clients should never include user supplied values directly in the selection string, as this presents an avenue for SQL injection attacks. In lieu of this, a client should use standard placeholder notation to represent values in a selection string, then supply a corresponding value in {@value #QUERY_ARG_SQL_SELECTION_ARGS}. **Apps targeting[android.os.Build.VERSION_CODES#O](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#O:kotlin.Int)or higher are strongly encourage to use structured query arguments in lieu of opaque SQL query clauses.** <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [QUERY_ARG_SQL_SORT_ORDER](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_ARG_SQL_SORT_ORDER:kotlin.String) <br /> Key for an SQL style sort string that may be present in the query Bundle argument passed to[ContentProvider.query(Uri, String[], Bundle, CancellationSignal)](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#query(android.net.Uri,%20kotlin.Array,%20android.os.Bundle,%20android.os.CancellationSignal))when called by a legacy client. **Apps targeting[android.os.Build.VERSION_CODES#O](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#O:kotlin.Int)or higher are strongly encourage to use structured query arguments in lieu of opaque SQL query clauses.** <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [QUERY_SORT_DIRECTION_ASCENDING](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_SORT_DIRECTION_ASCENDING:kotlin.Int) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [QUERY_SORT_DIRECTION_DESCENDING](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#QUERY_SORT_DIRECTION_DESCENDING:kotlin.Int) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SCHEME_ANDROID_RESOURCE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_ANDROID_RESOURCE:kotlin.String) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SCHEME_CONTENT](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_CONTENT:kotlin.String) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SCHEME_FILE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_FILE:kotlin.String) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SYNC_EXTRAS_ACCOUNT](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_ACCOUNT:kotlin.String) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SYNC_EXTRAS_DISCARD_LOCAL_DELETIONS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_DISCARD_LOCAL_DELETIONS:kotlin.String) <br /> Indicates that the sync adapter should not proceed with the delete operations, if it determines that there are too many. See[SyncResult.tooManyDeletions](https://developer.android.com/reference/kotlin/android/content/SyncResult.html#tooManyDeletions:kotlin.Boolean) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SYNC_EXTRAS_DO_NOT_RETRY](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_DO_NOT_RETRY:kotlin.String) <br /> If this extra is set to true then the request will not be retried if it fails. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SYNC_EXTRAS_EXPEDITED](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_EXPEDITED:kotlin.String) <br /> 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. This is different from[SYNC_EXTRAS_SCHEDULE_AS_EXPEDITED_JOB](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_SCHEDULE_AS_EXPEDITED_JOB:kotlin.String). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SYNC_EXTRAS_FORCE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_FORCE:kotlin.String) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SYNC_EXTRAS_IGNORE_BACKOFF](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_IGNORE_BACKOFF:kotlin.String) <br /> 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. If this request fails and gets rescheduled then the retries will still honor the backoff. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SYNC_EXTRAS_IGNORE_SETTINGS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_IGNORE_SETTINGS:kotlin.String) <br /> If this extra is set to true then the sync settings (like getSyncAutomatically()) are ignored by the sync scheduler. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SYNC_EXTRAS_INITIALIZE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_INITIALIZE:kotlin.String) <br /> Set by the SyncManager to request that the SyncAdapter initialize itself for the given account/authority pair. One required initialization step is to ensure that[setIsSyncable(android.accounts.Account,java.lang.String,int)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#setIsSyncable(android.accounts.Account,%20kotlin.String,%20kotlin.Int))has been called with a \>= 0 value. When this flag is set the SyncAdapter does not need to do a full sync, though it is allowed to do so. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SYNC_EXTRAS_MANUAL](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_MANUAL:kotlin.String) <br /> Setting this extra is the equivalent of setting both[SYNC_EXTRAS_IGNORE_SETTINGS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_IGNORE_SETTINGS:kotlin.String)and[SYNC_EXTRAS_IGNORE_BACKOFF](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_IGNORE_BACKOFF:kotlin.String) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SYNC_EXTRAS_OVERRIDE_TOO_MANY_DELETIONS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_OVERRIDE_TOO_MANY_DELETIONS:kotlin.String) <br /> Indicates that the sync adapter should proceed with the delete operations, even if it determines that there are too many. See[SyncResult.tooManyDeletions](https://developer.android.com/reference/kotlin/android/content/SyncResult.html#tooManyDeletions:kotlin.Boolean) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SYNC_EXTRAS_REQUIRE_CHARGING](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_REQUIRE_CHARGING:kotlin.String) <br /> If this extra is set to true, the sync request will be scheduled only when the device is plugged in. This is equivalent to calling setRequiresCharging(true) on[SyncRequest](https://developer.android.com/reference/kotlin/android/content/SyncRequest.html#). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SYNC_EXTRAS_SCHEDULE_AS_EXPEDITED_JOB](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_SCHEDULE_AS_EXPEDITED_JOB:kotlin.String) <br /> Run this sync operation as an "expedited job" (see[android.app.job.JobInfo.Builder#setExpedited(boolean)](https://developer.android.com/reference/kotlin/android/app/job/JobInfo.Builder.html#setExpedited(kotlin.Boolean))). Normally (if this flag isn't specified), sync operations are executed as regular[android.app.job.JobService](https://developer.android.com/reference/kotlin/android/app/job/JobService.html#)jobs. Because Expedited Jobs have various restrictions compared to regular jobs, this flag cannot be combined with certain other flags, otherwise an`IllegalArgumentException`will be thrown. Notably, because Expedited Jobs do not support various constraints, the following restriction apply: - Can't be used with[SYNC_EXTRAS_REQUIRE_CHARGING](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_REQUIRE_CHARGING:kotlin.String) - Can't be used with[SYNC_EXTRAS_EXPEDITED](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_EXPEDITED:kotlin.String) - Can't be used on periodic syncs. - When an expedited-job-sync fails and a retry is scheduled, the retried sync will be scheduled as a regular job unless[SYNC_EXTRAS_IGNORE_BACKOFF](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_IGNORE_BACKOFF:kotlin.String)is set. This is different from[SYNC_EXTRAS_EXPEDITED](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_EXPEDITED:kotlin.String). <br />                                                                                                                                                                                                                                                                                                                                                                                                                | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SYNC_EXTRAS_UPLOAD](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_UPLOAD:kotlin.String) <br /> Indicates that this sync is intended to only upload local changes to the server. For example, this will be set to true if the sync is initiated by a call to[ContentResolver.notifyChange(android.net.Uri, android.database.ContentObserver, boolean)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20kotlin.Boolean)) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [SYNC_OBSERVER_TYPE_ACTIVE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_OBSERVER_TYPE_ACTIVE:kotlin.Int) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [SYNC_OBSERVER_TYPE_PENDING](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_OBSERVER_TYPE_PENDING:kotlin.Int) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [SYNC_OBSERVER_TYPE_SETTINGS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_OBSERVER_TYPE_SETTINGS:kotlin.Int) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | ||

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

|                                                                                                                                                                                                                                                                                                                                                                                                               Public methods                                                                                                                                                                                                                                                                                                                                                                                                                ||
|----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [addProvider](https://developer.android.com/reference/kotlin/android/test/mock/MockContentResolver#addProvider(kotlin.String,%20android.content.ContentProvider))`(`name:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `provider:` `[ContentProvider](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#)!`)` Adds access to a provider based on its authority                                                                                                                                                                                                                                                                                                                 |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [notifyChange](https://developer.android.com/reference/kotlin/android/test/mock/MockContentResolver#notifyChange(android.net.Uri,%20android.database.ContentObserver))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `observer:` `[ContentObserver](https://developer.android.com/reference/kotlin/android/database/ContentObserver.html#)?`)` Overrides the behavior from the parent class to completely ignore any content notifications sent to this object.                                                                                                                                                                                                                                                  |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [notifyChange](https://developer.android.com/reference/kotlin/android/test/mock/MockContentResolver#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20kotlin.Boolean))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `observer:` `[ContentObserver](https://developer.android.com/reference/kotlin/android/database/ContentObserver.html#)?`, `syncToNetwork:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Overrides the behavior from the parent class to completely ignore any content notifications sent to this object.                                                                                                                         |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [notifyChange](https://developer.android.com/reference/kotlin/android/test/mock/MockContentResolver#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20kotlin.Int))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `observer:` `[ContentObserver](https://developer.android.com/reference/kotlin/android/database/ContentObserver.html#)?`, `flags:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Overrides the behavior from the parent class to completely ignore any content notifications sent to this object.                                                                                                                                             |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [notifyChange](https://developer.android.com/reference/kotlin/android/test/mock/MockContentResolver#notifyChange(kotlin.collections.MutableCollection,%20android.database.ContentObserver,%20kotlin.Int))`(`uris:` `[MutableCollection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html)<[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)!>`, `observer:` `[ContentObserver](https://developer.android.com/reference/kotlin/android/database/ContentObserver.html#)?`, `flags:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Overrides the behavior from the parent class to completely ignore any content notifications sent to this object. |

| Inherited functions ||
|---|---|
| From class[ContentResolver](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#) |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [ContentProviderClient](https://developer.android.com/reference/kotlin/android/content/ContentProviderClient.html#)?                                                                                          | [acquireContentProviderClient](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#acquireContentProviderClient(android.net.Uri))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`)` <br /> Returns a[ContentProviderClient](https://developer.android.com/reference/kotlin/android/content/ContentProviderClient.html#)that is associated with the[ContentProvider](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#)that services the content at uri, starting the provider if necessary. Returns null if there is no provider associated wih the uri. The caller must indicate that they are done with the provider by calling[ContentProviderClient.release](https://developer.android.com/reference/kotlin/android/content/ContentProviderClient.html#release())which will allow the system to release the provider if it determines that there is no other reason for keeping it active. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [ContentProviderClient](https://developer.android.com/reference/kotlin/android/content/ContentProviderClient.html#)?                                                                                          | [acquireContentProviderClient](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#acquireContentProviderClient(kotlin.String))`(`name:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` <br /> Returns a[ContentProviderClient](https://developer.android.com/reference/kotlin/android/content/ContentProviderClient.html#)that is associated with the[ContentProvider](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#)with the authority of name, starting the provider if necessary. Returns null if there is no provider associated wih the uri. The caller must indicate that they are done with the provider by calling[ContentProviderClient.release](https://developer.android.com/reference/kotlin/android/content/ContentProviderClient.html#release())which will allow the system to release the provider if it determines that there is no other reason for keeping it active. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [ContentProviderClient](https://developer.android.com/reference/kotlin/android/content/ContentProviderClient.html#)?                                                                                          | [acquireUnstableContentProviderClient](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#acquireUnstableContentProviderClient(android.net.Uri))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`)` <br /> Like[acquireContentProviderClient(android.net.Uri)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#acquireContentProviderClient(android.net.Uri)), but for use when you do not trust the stability of the target content provider. This turns off the mechanism in the platform clean up processes that are dependent on a content provider if that content provider's process goes away. Normally you can safely assume that once you have acquired a provider, you can freely use it as needed and it won't disappear, even if your process is in the background. If using this method, you need to take care to deal with any failures when communicating with the provider, and be sure to close it so that it can be re-opened later. In particular, catching a[android.os.DeadObjectException](https://developer.android.com/reference/kotlin/android/os/DeadObjectException.html#)from the calls there will let you know that the content provider has gone away; at that point the current ContentProviderClient object is invalid, and you should release it. You can acquire a new one if you would like to try to restart the provider and perform new operations on it. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [ContentProviderClient](https://developer.android.com/reference/kotlin/android/content/ContentProviderClient.html#)?                                                                                          | [acquireUnstableContentProviderClient](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#acquireUnstableContentProviderClient(kotlin.String))`(`name:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` <br /> Like[acquireContentProviderClient(java.lang.String)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#acquireContentProviderClient(kotlin.String)), but for use when you do not trust the stability of the target content provider. This turns off the mechanism in the platform clean up processes that are dependent on a content provider if that content provider's process goes away. Normally you can safely assume that once you have acquired a provider, you can freely use it as needed and it won't disappear, even if your process is in the background. If using this method, you need to take care to deal with any failures when communicating with the provider, and be sure to close it so that it can be re-opened later. In particular, catching a[android.os.DeadObjectException](https://developer.android.com/reference/kotlin/android/os/DeadObjectException.html#)from the calls there will let you know that the content provider has gone away; at that point the current ContentProviderClient object is invalid, and you should release it. You can acquire a new one if you would like to try to restart the provider and perform new operations on it. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                                  | [addPeriodicSync](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#addPeriodicSync(android.accounts.Account,%20kotlin.String,%20android.os.Bundle,%20kotlin.Long))`(`account:` `[Account](https://developer.android.com/reference/kotlin/android/accounts/Account.html#)!`, `authority:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `extras:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!`, `pollFrequency:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` <br /> Specifies that a sync should be requested with the specified the account, authority, and extras at the given frequency. If there is already another periodic sync scheduled with the account, authority and extras then a new periodic sync won't be added, instead the frequency of the previous one will be updated. These periodic syncs honor the "syncAutomatically" and "masterSyncAutomatically" settings. Although these sync are scheduled at the specified frequency, it may take longer for it to actually be started if other syncs are ahead of it in the sync operation queue. This means that the actual start time may drift. Periodic syncs are not allowed to have any of[SYNC_EXTRAS_DO_NOT_RETRY](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_DO_NOT_RETRY:kotlin.String),[SYNC_EXTRAS_IGNORE_BACKOFF](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_IGNORE_BACKOFF:kotlin.String),[SYNC_EXTRAS_IGNORE_SETTINGS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_IGNORE_SETTINGS:kotlin.String),[SYNC_EXTRAS_INITIALIZE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_INITIALIZE:kotlin.String),[SYNC_EXTRAS_FORCE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_FORCE:kotlin.String),[SYNC_EXTRAS_EXPEDITED](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_EXPEDITED:kotlin.String),[SYNC_EXTRAS_MANUAL](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_MANUAL:kotlin.String),[SYNC_EXTRAS_SCHEDULE_AS_EXPEDITED_JOB](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_EXTRAS_SCHEDULE_AS_EXPEDITED_JOB:kotlin.String)set to true. If any are supplied then an[IllegalArgumentException](https://developer.android.com/reference/kotlin/java/lang/IllegalArgumentException.html#)will be thrown. This method requires the caller to hold the permission[android.Manifest.permission#WRITE_SYNC_SETTINGS](https://developer.android.com/reference/kotlin/android/Manifest.permission.html#WRITE_SYNC_SETTINGS:kotlin.String). The bundle for a periodic sync can be queried by applications with the correct permissions using[ContentResolver.getPeriodicSyncs(Account account, String provider)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#getPeriodicSyncs(android.accounts.Account,%20kotlin.String)), so no sensitive data should be transferred here. <br /> | | [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!                                                                                                                                   | [addStatusChangeListener](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#addStatusChangeListener(kotlin.Int,%20android.content.SyncStatusObserver))`(`mask:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `callback:` `[SyncStatusObserver](https://developer.android.com/reference/kotlin/android/content/SyncStatusObserver.html#)!`)` <br /> Request notifications when the different aspects of the SyncManager change. The different items that can be requested are: - [SYNC_OBSERVER_TYPE_PENDING](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_OBSERVER_TYPE_PENDING:kotlin.Int) - [SYNC_OBSERVER_TYPE_ACTIVE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_OBSERVER_TYPE_ACTIVE:kotlin.Int) - [SYNC_OBSERVER_TYPE_SETTINGS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SYNC_OBSERVER_TYPE_SETTINGS:kotlin.Int) The caller can set one or more of the status types in the mask for any given listener registration. <br /> <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[ContentProviderResult](https://developer.android.com/reference/kotlin/android/content/ContentProviderResult.html#)!>          | [applyBatch](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#applyBatch(kotlin.String,%20java.util.ArrayList))`(`authority:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `operations:` `[ArrayList](https://developer.android.com/reference/kotlin/java/util/ArrayList.html#)<[ContentProviderOperation](https://developer.android.com/reference/kotlin/android/content/ContentProviderOperation.html#)!>`)` <br /> Applies each of the[ContentProviderOperation](https://developer.android.com/reference/kotlin/android/content/ContentProviderOperation.html#)objects and returns an array of their results. Passes through OperationApplicationException, which may be thrown by the call to[ContentProviderOperation.apply](https://developer.android.com/reference/kotlin/android/content/ContentProviderOperation.html#apply(android.content.ContentProvider,%20kotlin.Array,%20kotlin.Int)). If all the applications succeed then a[ContentProviderResult](https://developer.android.com/reference/kotlin/android/content/ContentProviderResult.html#)array with the same number of elements as the operations will be returned. It is implementation-specific how many, if any, operations will have been successfully applied if a call to apply results in a[OperationApplicationException](https://developer.android.com/reference/kotlin/android/content/OperationApplicationException.html#). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                                                    | [bulkInsert](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#bulkInsert(android.net.Uri,%20kotlin.Array))`(`url:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `values:` `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[ContentValues](https://developer.android.com/reference/kotlin/android/content/ContentValues.html#)!>`)` <br /> Inserts multiple rows into a table at the given URL. This function make no guarantees about the atomicity of the insertions. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?                                                                                                                             | [call](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#call(android.net.Uri,%20kotlin.String,%20kotlin.String,%20android.os.Bundle))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `method:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `arg:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`, `extras:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?`)` <br /> Call a provider-defined method. This can be used to implement read or write interfaces which are cheaper than using a Cursor and/or do not fit into the traditional table model. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?                                                                                                                             | [call](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#call(kotlin.String,%20kotlin.String,%20kotlin.String,%20android.os.Bundle))`(`authority:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `method:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `arg:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`, `extras:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                                  | [cancelSync](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#cancelSync(android.net.Uri))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)!`)` <br /> Cancel any active or pending syncs that match the Uri. If the uri is null then all syncs will be canceled. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                                  | [cancelSync](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#cancelSync(android.accounts.Account,%20kotlin.String))`(`account:` `[Account](https://developer.android.com/reference/kotlin/android/accounts/Account.html#)!`, `authority:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` <br /> Cancel any active or pending syncs that match account and authority. The account and authority can each independently be set to null, which means that syncs with any account or authority, respectively, will match. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                                  | [cancelSync](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#cancelSync(android.content.SyncRequest))`(`request:` `[SyncRequest](https://developer.android.com/reference/kotlin/android/content/SyncRequest.html#)!`)` <br /> Remove the specified sync. This will cancel any pending or active syncs. If the request is for a periodic sync, this call will remove any future occurrences. If a periodic sync is specified, the caller must hold the permission[android.Manifest.permission#WRITE_SYNC_SETTINGS](https://developer.android.com/reference/kotlin/android/Manifest.permission.html#WRITE_SYNC_SETTINGS:kotlin.String). It is possible to cancel a sync using a SyncRequest object that is not the same object with which you requested the sync. Do so by building a SyncRequest with the same adapter, frequency,**and** extras bundle. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)?                                                                                                                                  | [canonicalize](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#canonicalize(android.net.Uri))`(`url:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`)` <br /> Transform the given url to a canonical representation of its referenced resource, which can be used across devices, persisted, backed up and restored, etc. The returned Uri is still a fully capable Uri for use with its content provider, allowing you to do all of the same content provider operations as with the original Uri -- #query,[openInputStream(android.net.Uri)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openInputStream(android.net.Uri)), etc. The only difference in behavior between the original and new Uris is that the content provider may need to do some additional work at each call using it to resolve it to the correct resource, especially if the canonical Uri has been moved to a different environment. If you are moving a canonical Uri between environments, you should perform another call to[canonicalize](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#canonicalize(android.net.Uri))with that original Uri to re-canonicalize it for the current environment. Alternatively, you may want to use[uncanonicalize](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#uncanonicalize(android.net.Uri))to transform it to a non-canonical Uri that works only in the current environment but potentially more efficiently than the canonical representation. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                                                    | [delete](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#delete(android.net.Uri,%20android.os.Bundle))`(`url:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `extras:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?`)` <br /> Deletes row(s) specified by a content URI. If the content provider supports transactions, the deletion will be atomic. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                                                    | [delete](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#delete(android.net.Uri,%20kotlin.String,%20kotlin.Array))`(`url:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `where:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`, `selectionArgs:` `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!>?`)` <br /> Deletes row(s) specified by a content URI. If the content provider supports transactions, the deletion will be atomic. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [SyncInfo](https://developer.android.com/reference/kotlin/android/content/SyncInfo.html#)!                                                                                                                    | [getCurrentSync](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#getCurrentSync())`()` <br /> If a sync is active returns the information about it, otherwise returns null. This method requires the caller to hold the permission[android.Manifest.permission#READ_SYNC_STATS](https://developer.android.com/reference/kotlin/android/Manifest.permission.html#READ_SYNC_STATS:kotlin.String). <br /> <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)<[SyncInfo](https://developer.android.com/reference/kotlin/android/content/SyncInfo.html#)!>!          | [getCurrentSyncs](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#getCurrentSyncs())`()` <br /> Returns a list with information about all the active syncs. This list will be empty if there are no active syncs. This method requires the caller to hold the permission[android.Manifest.permission#READ_SYNC_STATS](https://developer.android.com/reference/kotlin/android/Manifest.permission.html#READ_SYNC_STATS:kotlin.String). <br /> <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                                                    | [getIsSyncable](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#getIsSyncable(android.accounts.Account,%20kotlin.String))`(`account:` `[Account](https://developer.android.com/reference/kotlin/android/accounts/Account.html#)!`, `authority:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` <br /> Check if this account/provider is syncable. This method requires the caller to hold the permission[android.Manifest.permission#READ_SYNC_SETTINGS](https://developer.android.com/reference/kotlin/android/Manifest.permission.html#READ_SYNC_SETTINGS:kotlin.String). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                                                                                                            | [getMasterSyncAutomatically](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#getMasterSyncAutomatically())`()` <br /> Gets the global auto-sync setting that applies to all the providers and accounts. If this is false then the per-provider auto-sync setting is ignored. This method requires the caller to hold the permission[android.Manifest.permission#READ_SYNC_SETTINGS](https://developer.android.com/reference/kotlin/android/Manifest.permission.html#READ_SYNC_SETTINGS:kotlin.String). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)<[UriPermission](https://developer.android.com/reference/kotlin/android/content/UriPermission.html#)!> | [getOutgoingPersistedUriPermissions](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#getOutgoingPersistedUriPermissions())`()` <br /> Return list of all persisted URI permission grants that are hosted by the calling app. That is, the returned permissions have been granted*from* the calling app. Only grants taken with[takePersistableUriPermission(android.net.Uri,int)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#takePersistableUriPermission(android.net.Uri,%20kotlin.Int))are returned. Note: Some of the returned URIs may not be usable until after the user is unlocked. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)<[PeriodicSync](https://developer.android.com/reference/kotlin/android/content/PeriodicSync.html#)!>!  | [getPeriodicSyncs](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#getPeriodicSyncs(android.accounts.Account,%20kotlin.String))`(`account:` `[Account](https://developer.android.com/reference/kotlin/android/accounts/Account.html#)!`, `authority:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` <br /> Get the list of information about the periodic syncs for the given account and authority. This method requires the caller to hold the permission[android.Manifest.permission#READ_SYNC_SETTINGS](https://developer.android.com/reference/kotlin/android/Manifest.permission.html#READ_SYNC_SETTINGS:kotlin.String). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)<[UriPermission](https://developer.android.com/reference/kotlin/android/content/UriPermission.html#)!> | [getPersistedUriPermissions](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#getPersistedUriPermissions())`()` <br /> Return list of all URI permission grants that have been persisted by the calling app. That is, the returned permissions have been granted*to* the calling app. Only persistable grants taken with[takePersistableUriPermission(android.net.Uri,int)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#takePersistableUriPermission(android.net.Uri,%20kotlin.Int))are returned. Note: Some of the returned URIs may not be usable until after the user is unlocked. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!>?                                            | [getStreamTypes](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#getStreamTypes(android.net.Uri,%20kotlin.String))`(`url:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `mimeTypeFilter:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` <br /> Query for the possible MIME types for the representations the given content URL can be returned when opened as as stream with #openTypedAssetFileDescriptor. Note that the types here are not necessarily a superset of the type returned by[getType](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#getType(android.net.Uri))-- many content providers cannot return a raw stream for the structured data that they contain. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[SyncAdapterType](https://developer.android.com/reference/kotlin/android/content/SyncAdapterType.html#)!>!                     | [getSyncAdapterTypes](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#getSyncAdapterTypes())`()` <br /> Get information about the SyncAdapters that are known to the system. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                                                                                                            | [getSyncAutomatically](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#getSyncAutomatically(android.accounts.Account,%20kotlin.String))`(`account:` `[Account](https://developer.android.com/reference/kotlin/android/accounts/Account.html#)!`, `authority:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` <br /> Check if the provider should be synced when a network tickle is received This method requires the caller to hold the permission[android.Manifest.permission#READ_SYNC_SETTINGS](https://developer.android.com/reference/kotlin/android/Manifest.permission.html#READ_SYNC_SETTINGS:kotlin.String). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?                                                                                                                             | [getType](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#getType(android.net.Uri))`(`url:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`)` <br /> Return the MIME type of the given content URL. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [ContentResolver.MimeTypeInfo](https://developer.android.com/reference/kotlin/android/content/ContentResolver.MimeTypeInfo.html#)                                                                             | [getTypeInfo](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#getTypeInfo(kotlin.String))`(`mimeType:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` <br /> Return a detailed description of the given MIME type, including an icon and label that describe the type. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)?                                                                                                                                  | [insert](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#insert(android.net.Uri,%20android.content.ContentValues))`(`url:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `values:` `[ContentValues](https://developer.android.com/reference/kotlin/android/content/ContentValues.html#)?`)` <br /> Inserts a row into a table at the given URL. If the content provider supports transactions the insertion will be atomic. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)?                                                                                                                                  | [insert](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#insert(android.net.Uri,%20android.content.ContentValues,%20android.os.Bundle))`(`url:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `values:` `[ContentValues](https://developer.android.com/reference/kotlin/android/content/ContentValues.html#)?`, `extras:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?`)` <br /> Inserts a row into a table at the given URL. If the content provider supports transactions the insertion will be atomic. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                                                                                                            | [isSyncActive](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#isSyncActive(android.accounts.Account,%20kotlin.String))`(`account:` `[Account](https://developer.android.com/reference/kotlin/android/accounts/Account.html#)!`, `authority:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` <br /> Returns true if there is currently a sync operation for the given account or authority actively being processed. This method requires the caller to hold the permission[android.Manifest.permission#READ_SYNC_STATS](https://developer.android.com/reference/kotlin/android/Manifest.permission.html#READ_SYNC_STATS:kotlin.String). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                                                                                                            | [isSyncPending](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#isSyncPending(android.accounts.Account,%20kotlin.String))`(`account:` `[Account](https://developer.android.com/reference/kotlin/android/accounts/Account.html#)!`, `authority:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` <br /> Return true if the pending status is true of any matching authorities. This method requires the caller to hold the permission[android.Manifest.permission#READ_SYNC_STATS](https://developer.android.com/reference/kotlin/android/Manifest.permission.html#READ_SYNC_STATS:kotlin.String). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)                                                                                                                        | [loadThumbnail](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#loadThumbnail(android.net.Uri,%20android.util.Size,%20android.os.CancellationSignal))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `size:` `[Size](https://developer.android.com/reference/kotlin/android/util/Size.html#)`, `signal:` `[CancellationSignal](https://developer.android.com/reference/kotlin/android/os/CancellationSignal.html#)?`)` <br /> Convenience method that efficiently loads a visual thumbnail for the given[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#). Internally calls android.content.ContentProvider#openTypedAssetFile on the remote provider, but also defensively resizes any returned content to match the requested target size. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [AssetFileDescriptor](https://developer.android.com/reference/kotlin/android/content/res/AssetFileDescriptor.html#)?                                                                                          | [openAssetFile](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openAssetFile(android.net.Uri,%20kotlin.String,%20android.os.CancellationSignal))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `mode:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `signal:` `[CancellationSignal](https://developer.android.com/reference/kotlin/android/os/CancellationSignal.html#)?`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [AssetFileDescriptor](https://developer.android.com/reference/kotlin/android/content/res/AssetFileDescriptor.html#)?                                                                                          | [openAssetFileDescriptor](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openAssetFileDescriptor(android.net.Uri,%20kotlin.String))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `mode:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` <br /> Open a raw file descriptor to access data under a URI. This interacts with the underlying android.content.ContentProvider#openAssetFile method of the provider associated with the given URI, to retrieve any file stored there. ##### Accepts the following URI schemes: - content ([SCHEME_CONTENT](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_CONTENT:kotlin.String)) - android.resource ([SCHEME_ANDROID_RESOURCE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_ANDROID_RESOURCE:kotlin.String)) - file ([SCHEME_FILE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_FILE:kotlin.String)) ##### The android.resource ([SCHEME_ANDROID_RESOURCE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_ANDROID_RESOURCE:kotlin.String)) Scheme <br /> A Uri object can be used to reference a resource in an APK file. The Uri should be one of the following formats: - `android.resource://package_name/id_number` `package_name`is your package name as listed in your AndroidManifest.xml. For example`com.example.myapp` `id_number`is the int form of the ID. The easiest way to construct this form is ```kotlin Uri uri = Uri.parse("android.resource://com.example.myapp/" + R.raw.my_resource"); ``` - `android.resource://package_name/type/name` `package_name`is your package name as listed in your AndroidManifest.xml. For example`com.example.myapp` `type`is the string form of the resource type. For example,`raw`or`drawable`.`name`is the string form of the resource name. That is, whatever the file name was in your res directory, without the type extension. The easiest way to construct this form is ```kotlin Uri uri = Uri.parse("android.resource://com.example.myapp/raw/my_resource"); ``` Note that if this function is called for read-only input (mode is "r") on a content: URI, it will instead call #openTypedAssetFileDescriptor for you with a MIME type of "\*/\*". This allows such callers to benefit from any built-in data conversion that a provider implements. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [AssetFileDescriptor](https://developer.android.com/reference/kotlin/android/content/res/AssetFileDescriptor.html#)?                                                                                          | [openAssetFileDescriptor](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openAssetFileDescriptor(android.net.Uri,%20kotlin.String,%20android.os.CancellationSignal))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `mode:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `cancellationSignal:` `[CancellationSignal](https://developer.android.com/reference/kotlin/android/os/CancellationSignal.html#)?`)` <br /> Open a raw file descriptor to access data under a URI. This interacts with the underlying android.content.ContentProvider#openAssetFile method of the provider associated with the given URI, to retrieve any file stored there. ##### Accepts the following URI schemes: - content ([SCHEME_CONTENT](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_CONTENT:kotlin.String)) - android.resource ([SCHEME_ANDROID_RESOURCE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_ANDROID_RESOURCE:kotlin.String)) - file ([SCHEME_FILE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_FILE:kotlin.String)) ##### The android.resource ([SCHEME_ANDROID_RESOURCE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_ANDROID_RESOURCE:kotlin.String)) Scheme <br /> A Uri object can be used to reference a resource in an APK file. The Uri should be one of the following formats: - `android.resource://package_name/id_number` `package_name`is your package name as listed in your AndroidManifest.xml. For example`com.example.myapp` `id_number`is the int form of the ID. The easiest way to construct this form is ```kotlin Uri uri = Uri.parse("android.resource://com.example.myapp/" + R.raw.my_resource"); ``` - `android.resource://package_name/type/name` `package_name`is your package name as listed in your AndroidManifest.xml. For example`com.example.myapp` `type`is the string form of the resource type. For example,`raw`or`drawable`.`name`is the string form of the resource name. That is, whatever the file name was in your res directory, without the type extension. The easiest way to construct this form is ```kotlin Uri uri = Uri.parse("android.resource://com.example.myapp/raw/my_resource"); ``` Note that if this function is called for read-only input (mode is "r") on a content: URI, it will instead call #openTypedAssetFileDescriptor for you with a MIME type of "\*/\*". This allows such callers to benefit from any built-in data conversion that a provider implements. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [ParcelFileDescriptor](https://developer.android.com/reference/kotlin/android/os/ParcelFileDescriptor.html#)?                                                                                                 | [openFile](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openFile(android.net.Uri,%20kotlin.String,%20android.os.CancellationSignal))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `mode:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `signal:` `[CancellationSignal](https://developer.android.com/reference/kotlin/android/os/CancellationSignal.html#)?`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [ParcelFileDescriptor](https://developer.android.com/reference/kotlin/android/os/ParcelFileDescriptor.html#)?                                                                                                 | [openFileDescriptor](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openFileDescriptor(android.net.Uri,%20kotlin.String))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `mode:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` <br /> Open a raw file descriptor to access data under a URI. This is like[openAssetFileDescriptor(android.net.Uri,java.lang.String)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openAssetFileDescriptor(android.net.Uri,%20kotlin.String)), but uses the underlying android.content.ContentProvider#openFile ContentProvider.openFile()} method, so will*not* work with providers that return sub-sections of files. If at all possible, you should use[openAssetFileDescriptor(android.net.Uri,java.lang.String)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openAssetFileDescriptor(android.net.Uri,%20kotlin.String)). You will receive a FileNotFoundException exception if the provider returns a sub-section of a file. ##### Accepts the following URI schemes: - content ([SCHEME_CONTENT](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_CONTENT:kotlin.String)) - file ([SCHEME_FILE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_FILE:kotlin.String)) <br /> See[openAssetFileDescriptor(android.net.Uri,java.lang.String)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openAssetFileDescriptor(android.net.Uri,%20kotlin.String))for more information on these schemes. If opening with the exclusive "r" or "w" modes, the returned ParcelFileDescriptor could be a pipe or socket pair to enable streaming of data. Opening with the "rw" mode implies a file on disk that supports seeking. If possible, always use an exclusive mode to give the underlying[ContentProvider](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#)the most flexibility. If you are writing a file, and need to communicate an error to the provider, use[ParcelFileDescriptor.closeWithError(String)](https://developer.android.com/reference/kotlin/android/os/ParcelFileDescriptor.html#closeWithError(kotlin.String)). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [ParcelFileDescriptor](https://developer.android.com/reference/kotlin/android/os/ParcelFileDescriptor.html#)?                                                                                                 | [openFileDescriptor](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openFileDescriptor(android.net.Uri,%20kotlin.String,%20android.os.CancellationSignal))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `mode:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `cancellationSignal:` `[CancellationSignal](https://developer.android.com/reference/kotlin/android/os/CancellationSignal.html#)?`)` <br /> Open a raw file descriptor to access data under a URI. This is like[openAssetFileDescriptor(android.net.Uri,java.lang.String)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openAssetFileDescriptor(android.net.Uri,%20kotlin.String)), but uses the underlying android.content.ContentProvider#openFile ContentProvider.openFile()} method, so will*not* work with providers that return sub-sections of files. If at all possible, you should use[openAssetFileDescriptor(android.net.Uri,java.lang.String)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openAssetFileDescriptor(android.net.Uri,%20kotlin.String)). You will receive a FileNotFoundException exception if the provider returns a sub-section of a file. ##### Accepts the following URI schemes: - content ([SCHEME_CONTENT](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_CONTENT:kotlin.String)) - file ([SCHEME_FILE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_FILE:kotlin.String)) <br /> See[openAssetFileDescriptor(android.net.Uri,java.lang.String)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openAssetFileDescriptor(android.net.Uri,%20kotlin.String))for more information on these schemes. If opening with the exclusive "r" or "w" modes, the returned ParcelFileDescriptor could be a pipe or socket pair to enable streaming of data. Opening with the "rw" mode implies a file on disk that supports seeking. If possible, always use an exclusive mode to give the underlying[ContentProvider](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#)the most flexibility. If you are writing a file, and need to communicate an error to the provider, use[ParcelFileDescriptor.closeWithError(String)](https://developer.android.com/reference/kotlin/android/os/ParcelFileDescriptor.html#closeWithError(kotlin.String)). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [InputStream](https://developer.android.com/reference/kotlin/java/io/InputStream.html#)?                                                                                                                      | [openInputStream](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openInputStream(android.net.Uri))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`)` <br /> Open a stream on to the content associated with a content URI. If there is no data associated with the URI, FileNotFoundException is thrown. ##### Accepts the following URI schemes: - content ([SCHEME_CONTENT](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_CONTENT:kotlin.String)) - android.resource ([SCHEME_ANDROID_RESOURCE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_ANDROID_RESOURCE:kotlin.String)) - file ([SCHEME_FILE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_FILE:kotlin.String)) <br /> See[openAssetFileDescriptor(android.net.Uri,java.lang.String)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openAssetFileDescriptor(android.net.Uri,%20kotlin.String))for more information on these schemes. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [OutputStream](https://developer.android.com/reference/kotlin/java/io/OutputStream.html#)?                                                                                                                    | [openOutputStream](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openOutputStream(android.net.Uri))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`)` <br /> Synonym for[openOutputStream(uri, "w")](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openOutputStream(android.net.Uri,%20kotlin.String)). Please note the implementation of "w" is up to each Provider implementation and it may or may not truncate. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [OutputStream](https://developer.android.com/reference/kotlin/java/io/OutputStream.html#)?                                                                                                                    | [openOutputStream](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openOutputStream(android.net.Uri,%20kotlin.String))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `mode:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` <br /> Open a stream on to the content associated with a content URI. If there is no data associated with the URI, FileNotFoundException is thrown. ##### Accepts the following URI schemes: - content ([SCHEME_CONTENT](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_CONTENT:kotlin.String)) - file ([SCHEME_FILE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#SCHEME_FILE:kotlin.String)) <br /> See[openAssetFileDescriptor(android.net.Uri,java.lang.String)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openAssetFileDescriptor(android.net.Uri,%20kotlin.String))for more information on these schemes. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [AssetFileDescriptor](https://developer.android.com/reference/kotlin/android/content/res/AssetFileDescriptor.html#)?                                                                                          | [openTypedAssetFile](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openTypedAssetFile(android.net.Uri,%20kotlin.String,%20android.os.Bundle,%20android.os.CancellationSignal))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `mimeTypeFilter:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `opts:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?`, `signal:` `[CancellationSignal](https://developer.android.com/reference/kotlin/android/os/CancellationSignal.html#)?`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [AssetFileDescriptor](https://developer.android.com/reference/kotlin/android/content/res/AssetFileDescriptor.html#)?                                                                                          | [openTypedAssetFileDescriptor](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openTypedAssetFileDescriptor(android.net.Uri,%20kotlin.String,%20android.os.Bundle))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `mimeType:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `opts:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?`)` <br /> Open a raw file descriptor to access (potentially type transformed) data from a "content:" URI. This interacts with the underlying android.content.ContentProvider#openTypedAssetFile method of the provider associated with the given URI, to retrieve retrieve any appropriate data stream for the data stored there. Unlike #openAssetFileDescriptor, this function only works with "content:" URIs, because content providers are the only facility with an associated MIME type to ensure that the returned data stream is of the desired type. All text/\* streams are encoded in UTF-8. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [AssetFileDescriptor](https://developer.android.com/reference/kotlin/android/content/res/AssetFileDescriptor.html#)?                                                                                          | [openTypedAssetFileDescriptor](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#openTypedAssetFileDescriptor(android.net.Uri,%20kotlin.String,%20android.os.Bundle,%20android.os.CancellationSignal))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `mimeType:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `opts:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?`, `cancellationSignal:` `[CancellationSignal](https://developer.android.com/reference/kotlin/android/os/CancellationSignal.html#)?`)` <br /> Open a raw file descriptor to access (potentially type transformed) data from a "content:" URI. This interacts with the underlying android.content.ContentProvider#openTypedAssetFile method of the provider associated with the given URI, to retrieve any appropriate data stream for the data stored there. Unlike #openAssetFileDescriptor, this function only works with "content:" URIs, because content providers are the only facility with an associated MIME type to ensure that the returned data stream is of the desired type. All text/\* streams are encoded in UTF-8. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)?                                                                                                                       | [query](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#query(android.net.Uri,%20kotlin.Array,%20android.os.Bundle,%20android.os.CancellationSignal))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `projection:` `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!>?`, `queryArgs:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?`, `cancellationSignal:` `[CancellationSignal](https://developer.android.com/reference/kotlin/android/os/CancellationSignal.html#)?`)` <br /> Query the given URI, returning a[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)over the result set with support for cancellation. For best performance, the caller should follow these guidelines: - Provide an explicit projection, to prevent reading data from storage that aren't going to be used. Provider must identify which QUERY_ARG_SORT\* arguments were honored during the preparation of the result set by including the respective argument keys in the[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)extras[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#). See[EXTRA_HONORED_ARGS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#EXTRA_HONORED_ARGS:kotlin.String)for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)?                                                                                                                       | [query](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#query(android.net.Uri,%20kotlin.Array,%20kotlin.String,%20kotlin.Array,%20kotlin.String))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `projection:` `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!>?`, `selection:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`, `selectionArgs:` `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!>?`, `sortOrder:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`)` <br /> Query the given URI, returning a[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)over the result set. For best performance, the caller should follow these guidelines: - Provide an explicit projection, to prevent reading data from storage that aren't going to be used. - Use question mark parameter markers such as 'phone=?' instead of explicit values in the`selection`parameter, so that queries that differ only by those values will be recognized as the same for caching purposes. <br /> <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)?                                                                                                                       | [query](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#query(android.net.Uri,%20kotlin.Array,%20kotlin.String,%20kotlin.Array,%20kotlin.String,%20android.os.CancellationSignal))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `projection:` `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!>?`, `selection:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`, `selectionArgs:` `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!>?`, `sortOrder:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`, `cancellationSignal:` `[CancellationSignal](https://developer.android.com/reference/kotlin/android/os/CancellationSignal.html#)?`)` <br /> Query the given URI, returning a[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)over the result set with optional support for cancellation. For best performance, the caller should follow these guidelines: - Provide an explicit projection, to prevent reading data from storage that aren't going to be used. - Use question mark parameter markers such as 'phone=?' instead of explicit values in the`selection`parameter, so that queries that differ only by those values will be recognized as the same for caching purposes. <br /> <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                                                                                                            | [refresh](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#refresh(android.net.Uri,%20android.os.Bundle,%20android.os.CancellationSignal))`(`url:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `extras:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?`, `cancellationSignal:` `[CancellationSignal](https://developer.android.com/reference/kotlin/android/os/CancellationSignal.html#)?`)` <br /> This allows clients to request an explicit refresh of content identified by`uri`. Client code should only invoke this method when there is a strong indication (such as a user initiated pull to refresh gesture) that the content is stale. <br /> <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                                  | [registerContentObserver](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#registerContentObserver(android.net.Uri,%20kotlin.Boolean,%20android.database.ContentObserver))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `notifyForDescendants:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `observer:` `[ContentObserver](https://developer.android.com/reference/kotlin/android/database/ContentObserver.html#)`)` <br /> Register an observer class that gets callbacks when data identified by a given content URI changes. Starting in[android.os.Build.VERSION_CODES#O](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#O:kotlin.Int), all content notifications must be backed by a valid[ContentProvider](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                                  | [releasePersistableUriPermission](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#releasePersistableUriPermission(android.net.Uri,%20kotlin.Int))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `modeFlags:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Relinquish a persisted URI permission grant. The URI must have been previously made persistent with[takePersistableUriPermission(android.net.Uri,int)](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#takePersistableUriPermission(android.net.Uri,%20kotlin.Int)). Any non-persistent grants to the calling package will remain intact. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                                  | [removePeriodicSync](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#removePeriodicSync(android.accounts.Account,%20kotlin.String,%20android.os.Bundle))`(`account:` `[Account](https://developer.android.com/reference/kotlin/android/accounts/Account.html#)!`, `authority:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `extras:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!`)` <br /> Remove a periodic sync. Has no affect if account, authority and extras don't match an existing periodic sync. This method requires the caller to hold the permission[android.Manifest.permission#WRITE_SYNC_SETTINGS](https://developer.android.com/reference/kotlin/android/Manifest.permission.html#WRITE_SYNC_SETTINGS:kotlin.String). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                                  | [removeStatusChangeListener](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#removeStatusChangeListener(kotlin.Any))`(`handle:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!`)` <br /> Remove a previously registered status change listener. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                                  | [requestSync](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#requestSync(android.accounts.Account,%20kotlin.String,%20android.os.Bundle))`(`account:` `[Account](https://developer.android.com/reference/kotlin/android/accounts/Account.html#)!`, `authority:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `extras:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!`)` <br /> Start an asynchronous sync operation. If you want to monitor the progress of the sync you may register a SyncObserver. Only values of the following types may be used in the extras bundle: - Integer - Long - Boolean - Float - Double - String - Account - null <br /> <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                                  | [requestSync](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#requestSync(android.content.SyncRequest))`(`request:` `[SyncRequest](https://developer.android.com/reference/kotlin/android/content/SyncRequest.html#)!`)` <br /> Register a sync with the SyncManager. These requests are built using the[SyncRequest.Builder](https://developer.android.com/reference/kotlin/android/content/SyncRequest.Builder.html#). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                                  | [setIsSyncable](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#setIsSyncable(android.accounts.Account,%20kotlin.String,%20kotlin.Int))`(`account:` `[Account](https://developer.android.com/reference/kotlin/android/accounts/Account.html#)!`, `authority:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `syncable:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Set whether this account/provider is syncable. This method requires the caller to hold the permission[android.Manifest.permission#WRITE_SYNC_SETTINGS](https://developer.android.com/reference/kotlin/android/Manifest.permission.html#WRITE_SYNC_SETTINGS:kotlin.String). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                                  | [setMasterSyncAutomatically](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#setMasterSyncAutomatically(kotlin.Boolean))`(`sync:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` <br /> Sets the global auto-sync setting that applies to all the providers and accounts. If this is false then the per-provider auto-sync setting is ignored. This method requires the caller to hold the permission[android.Manifest.permission#WRITE_SYNC_SETTINGS](https://developer.android.com/reference/kotlin/android/Manifest.permission.html#WRITE_SYNC_SETTINGS:kotlin.String). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                                  | [setSyncAutomatically](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#setSyncAutomatically(android.accounts.Account,%20kotlin.String,%20kotlin.Boolean))`(`account:` `[Account](https://developer.android.com/reference/kotlin/android/accounts/Account.html#)!`, `authority:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `sync:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` <br /> Set whether or not the provider is synced when it receives a network tickle. This method requires the caller to hold the permission[android.Manifest.permission#WRITE_SYNC_SETTINGS](https://developer.android.com/reference/kotlin/android/Manifest.permission.html#WRITE_SYNC_SETTINGS:kotlin.String). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                                  | [startSync](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#startSync(android.net.Uri,%20android.os.Bundle))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)!`, `extras:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!`)` <br /> Start an asynchronous sync operation. If you want to monitor the progress of the sync you may register a SyncObserver. Only values of the following types may be used in the extras bundle: - Integer - Long - Boolean - Float - Double - String - Account - null <br /> <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                                  | [takePersistableUriPermission](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#takePersistableUriPermission(android.net.Uri,%20kotlin.Int))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `modeFlags:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Take a persistable URI permission grant that has been offered. Once taken, the permission grant will be remembered across device reboots. Only URI permissions granted with[Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION](https://developer.android.com/reference/kotlin/android/content/Intent.html#FLAG_GRANT_PERSISTABLE_URI_PERMISSION:kotlin.Int)can be persisted. If the grant has already been persisted, taking it again will touch[UriPermission.getPersistedTime()](https://developer.android.com/reference/kotlin/android/content/UriPermission.html#getPersistedTime()). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)?                                                                                                                                  | [uncanonicalize](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#uncanonicalize(android.net.Uri))`(`url:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`)` <br /> Given a canonical Uri previously generated by[canonicalize](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#canonicalize(android.net.Uri)), convert it to its local non-canonical form. This can be useful in some cases where you know that you will only be using the Uri in the current environment and want to avoid any possible overhead when using it with the content provider or want to verify that the referenced data exists at all in the new environment. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                                  | [unregisterContentObserver](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#unregisterContentObserver(android.database.ContentObserver))`(`observer:` `[ContentObserver](https://developer.android.com/reference/kotlin/android/database/ContentObserver.html#)`)` <br /> Unregisters a change observer. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                                                    | [update](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#update(android.net.Uri,%20android.content.ContentValues,%20android.os.Bundle))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `values:` `[ContentValues](https://developer.android.com/reference/kotlin/android/content/ContentValues.html#)?`, `extras:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)?`)` <br /> Update row(s) in a content URI. If the content provider supports transactions the update will be atomic. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                                                    | [update](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#update(android.net.Uri,%20android.content.ContentValues,%20kotlin.String,%20kotlin.Array))`(`uri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `values:` `[ContentValues](https://developer.android.com/reference/kotlin/android/content/ContentValues.html#)?`, `where:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`, `selectionArgs:` `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!>?`)` <br /> Update row(s) in a content URI. If the content provider supports transactions the update will be atomic. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                                                                                                                  | [validateSyncExtrasBundle](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#validateSyncExtrasBundle(android.os.Bundle))`(`extras:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!`)` <br /> Check that only values of the following types are in the Bundle: - Integer - Long - Boolean - Float - Double - String - Account - null <br /> <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [ContentResolver](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#)                                                                                                       | [wrap](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#wrap(android.content.ContentProvider))`(`wrapped:` `[ContentProvider](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#)`)` <br /> Create a[ContentResolver](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#)instance that redirects all its methods to the given[ContentProvider](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [ContentResolver](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#)                                                                                                       | [wrap](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#wrap(android.content.ContentProviderClient))`(`wrapped:` `[ContentProviderClient](https://developer.android.com/reference/kotlin/android/content/ContentProviderClient.html#)`)` <br /> Create a[ContentResolver](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#)instance that redirects all its methods to the given[ContentProviderClient](https://developer.android.com/reference/kotlin/android/content/ContentProviderClient.html#). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | ||

## Public constructors

### MockContentResolver

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

```
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.  

### MockContentResolver

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

```
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.

## Public methods

### addProvider

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

```
open fun addProvider(
    name: String!, 
    provider: ContentProvider!
): Unit
```

Adds access to a provider based on its authority

|                                                                                                                                          Parameters                                                                                                                                          ||
|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `name`     | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!:The authority name associated with the provider.                                                                                                                                               |
| `provider` | [ContentProvider](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#)!:An instance of[android.content.ContentProvider](https://developer.android.com/reference/kotlin/android/content/ContentProvider.html#)or one of its subclasses, or null. |

### notifyChange

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

```
open fun notifyChange(
    uri: Uri, 
    observer: ContentObserver?
): Unit
```

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.

|                                                                   Parameters                                                                   ||
|------------|------------------------------------------------------------------------------------------------------------------------------------|
| `uri`      | [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#):This value cannot be`null`.                            |
| `observer` | [ContentObserver](https://developer.android.com/reference/kotlin/android/database/ContentObserver.html#)?:This value may be`null`. |

### notifyChange

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

```
open fun notifyChange(
    uri: Uri, 
    observer: ContentObserver?, 
    syncToNetwork: Boolean
): Unit
```

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

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.

|                                                                                                                              Parameters                                                                                                                              ||
|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `uri`           | [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#):This value cannot be`null`.                                                                                                                                             |
| `observer`      | [ContentObserver](https://developer.android.com/reference/kotlin/android/database/ContentObserver.html#)?:This value may be`null`.                                                                                                                  |
| `syncToNetwork` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html):If true, same as[NOTIFY_SYNC_TO_NETWORK](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#NOTIFY_SYNC_TO_NETWORK:kotlin.Int). |

### notifyChange

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

```
open fun notifyChange(
    uri: Uri, 
    observer: ContentObserver?, 
    flags: Int
): Unit
```

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.

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Parameters                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ||
|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `uri`      | [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#):This value cannot be`null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `observer` | [ContentObserver](https://developer.android.com/reference/kotlin/android/database/ContentObserver.html#)?:This value may be`null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `flags`    | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):Value is either`0`or a combination of[android.content.ContentResolver#NOTIFY_SYNC_TO_NETWORK](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#NOTIFY_SYNC_TO_NETWORK:kotlin.Int),[android.content.ContentResolver#NOTIFY_SKIP_NOTIFY_FOR_DESCENDANTS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#NOTIFY_SKIP_NOTIFY_FOR_DESCENDANTS:kotlin.Int),[android.content.ContentResolver#NOTIFY_INSERT](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#NOTIFY_INSERT:kotlin.Int),[android.content.ContentResolver#NOTIFY_UPDATE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#NOTIFY_UPDATE:kotlin.Int), and[android.content.ContentResolver#NOTIFY_DELETE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#NOTIFY_DELETE:kotlin.Int) |

### notifyChange

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

```
open fun notifyChange(
    uris: MutableCollection<Uri!>, 
    observer: ContentObserver?, 
    flags: Int
): Unit
```

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.

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Parameters                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ||
|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `uris`     | [MutableCollection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html)\<[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)!\>:This value cannot be`null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `observer` | [ContentObserver](https://developer.android.com/reference/kotlin/android/database/ContentObserver.html#)?:This value may be`null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `flags`    | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):Value is either`0`or a combination of[android.content.ContentResolver#NOTIFY_SYNC_TO_NETWORK](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#NOTIFY_SYNC_TO_NETWORK:kotlin.Int),[android.content.ContentResolver#NOTIFY_SKIP_NOTIFY_FOR_DESCENDANTS](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#NOTIFY_SKIP_NOTIFY_FOR_DESCENDANTS:kotlin.Int),[android.content.ContentResolver#NOTIFY_INSERT](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#NOTIFY_INSERT:kotlin.Int),[android.content.ContentResolver#NOTIFY_UPDATE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#NOTIFY_UPDATE:kotlin.Int), and[android.content.ContentResolver#NOTIFY_DELETE](https://developer.android.com/reference/kotlin/android/content/ContentResolver.html#NOTIFY_DELETE:kotlin.Int) |