Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/provider/MediaStore#nestedclasses) \| [Constants](https://developer.android.com/reference/android/provider/MediaStore#constants) \| [Fields](https://developer.android.com/reference/android/provider/MediaStore#lfields) \| [Ctors](https://developer.android.com/reference/android/provider/MediaStore#pubctors) \| [Methods](https://developer.android.com/reference/android/provider/MediaStore#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/provider/MediaStore#inhmethods)

# MediaStore

*** ** * ** ***


`
public

final

class
MediaStore
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.provider.MediaStore |

<br />

*** ** * ** ***

The contract between the media provider and applications. Contains
definitions for the supported URIs and columns.


The media provider provides an indexed collection of common media types, such
as `https://developer.android.com/reference/android/provider/MediaStore.Audio`, `https://developer.android.com/reference/android/provider/MediaStore.Video`, and `https://developer.android.com/reference/android/provider/MediaStore.Images`, from any attached
storage devices. Each collection is organized based on the primary MIME type
of the underlying content; for example, `image/*` content is indexed
under `https://developer.android.com/reference/android/provider/MediaStore.Images`. The `https://developer.android.com/reference/android/provider/MediaStore.Files` collection provides a broad view
across all collections, and does not filter by MIME type.

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/provider/MediaStore.Audio` Collection of all media with MIME type of `audio/*`. |
| ` class` | `https://developer.android.com/reference/android/provider/MediaStore.DeletedFiles` Media provider table containing records of deleted media items. |
| ` interface` | `https://developer.android.com/reference/android/provider/MediaStore.DownloadColumns` Download metadata columns. |
| ` class` | `https://developer.android.com/reference/android/provider/MediaStore.Downloads` Collection of downloaded items. |
| ` class` | `https://developer.android.com/reference/android/provider/MediaStore.Files` Media provider table containing an index of all files in the media storage, including non-media files. |
| ` class` | `https://developer.android.com/reference/android/provider/MediaStore.Images` Collection of all media with MIME type of `image/*`. |
| ` interface` | `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns` Common media metadata columns. |
| ` class` | `https://developer.android.com/reference/android/provider/MediaStore.PickerMediaColumns` Photo picker metadata columns. |
| ` class` | `https://developer.android.com/reference/android/provider/MediaStore.Video` Collection of all media with MIME type of `video/*`. |

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#ACCESS_MEDIA_OWNER_PACKAGE_NAME_PERMISSION` Permission that grants access to `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#OWNER_PACKAGE_NAME` of every accessible media file. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#ACCESS_OEM_METADATA_PERMISSION` Permission that grants access to `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#OEM_METADATA` of every accessible media file. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#ACTION_IMAGE_CAPTURE` Standard Intent action that can be sent to have the camera application capture an image and return it. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#ACTION_IMAGE_CAPTURE_SECURE` Intent action that can be sent to have the camera application capture an image and return it when the device is secured (e.g. with a pin, password, pattern, or face unlock). |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#ACTION_MOTION_PHOTO_CAPTURE` Standard Intent action that can be sent to have the camera application capture a [motion photo](https://developer.android.com/media/platform/motion-photo-format) and return it. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#ACTION_MOTION_PHOTO_CAPTURE_SECURE` Intent action that can be sent to have the camera application capture a [motion photo](https://developer.android.com/media/platform/motion-photo-format) and return it when the device is secured (e.g. with a pin, password, pattern, or face unlock). |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES` Activity Action: Allow the user to select images or videos provided by system and return it. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES_SETTINGS` Activity Action: Launch settings controlling images or videos selection with `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#ACTION_REVIEW` Standard action that can be sent to review the given media file. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#ACTION_REVIEW_SECURE` Standard action that can be sent to review the given media file when the device is secured (e.g. with a pin, password, pattern, or face unlock). |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#ACTION_VIDEO_CAPTURE` Standard Intent action that can be sent to have the camera application capture a video and return it. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY` The authority for the media provider |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_ACCEPT_ORIGINAL_MEDIA_FORMAT` /\*\* Specify that the caller wants to receive the original media format without transcoding. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_BRIGHTNESS` When defined, the launched application is requested to set the given brightness value via `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#screenBrightness` to help ensure a smooth transition when launching `https://developer.android.com/reference/android/provider/MediaStore#ACTION_REVIEW` or `https://developer.android.com/reference/android/provider/MediaStore#ACTION_REVIEW_SECURE` intents. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_DURATION_LIMIT` Specify the maximum allowed recording duration in seconds. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_FINISH_ON_COMPLETION` The name of the Intent-extra used to control the onCompletion behavior of a MovieView. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_FULL_SCREEN` The name of an Intent-extra used to control the UI of a ViewImage. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_MEDIA_ALBUM` The name of the Intent-extra used to define the album |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_MEDIA_ARTIST` The name of the Intent-extra used to define the artist |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_MEDIA_CAPABILITIES` Specify the `https://developer.android.com/reference/android/media/ApplicationMediaCapabilities` that should be used while opening a media or picking media files. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_MEDIA_CAPABILITIES_UID` Specify the UID of the app that should be used to determine supported media capabilities while opening a media. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_MEDIA_FOCUS` The name of the Intent-extra used to define the search focus. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_MEDIA_GENRE` The name of the Intent-extra used to define the genre. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_MEDIA_PLAYLIST` *This constant was deprecated in API level 31. Android playlists are now deprecated. We will keep the current functionality for compatibility resons, but we will no longer take feature request. We do not advise adding new usages of Android Playlists. M3U files can be used as an alternative.* |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_MEDIA_RADIO_CHANNEL` The name of the Intent-extra used to define the radio channel. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_MEDIA_TITLE` The name of the Intent-extra used to define the song title |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_OUTPUT` The name of the Intent-extra used to indicate a content resolver Uri to be used to store the requested image or video. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICKER_PRE_SELECTION_URIS` The name of an optional intent-extra used to specify URIs for pre-selection in photo picker opened with `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES` in multi-select mode. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_ACCENT_COLOR` The name of an optional intent-extra used to allow apps to specify the picker accent color. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_ALBUM` The name of an optional intent-extra used to allow apps to highlight media results of a photopicker album in the photopicker UI whenever feasible based on the given input album in `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_SEARCH_RESULTS` The name of an optional intent-extra used to allow apps to highlight search results in the photopicker UI whenever feasible based on the given input text query in `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_SEARCH_TEXT_QUERY` The extra can only be specified in `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_IN_ORDER` The name of an optional intent-extra used to allow ordered selection of items. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_LAUNCH_TAB` The name of an optional intent-extra used to allow apps to specify the tab the picker should open with. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_MAX` The name of an optional intent-extra used to allow multiple selection of items and constrain maximum number of items that can be returned by `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`, action may still return nothing (0 items) if the user chooses to cancel. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_SELECTION_PARAMS` The name of an optional intent-extra used to pass `https://developer.android.com/reference/android/widget/photopicker/PhotoPickerSelectionParams` to the photo picker. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_UI_CUSTOMIZATION_PARAMS` The name of an optional intent-extra used to set the ui customization options in the PhotoPicker. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_REQUEST_LOCATION_METADATA_ACCESS` The name of an optional intent-extra used to allow apps to request access to the location metadata of the media items selected by the user and returned by `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_SCREEN_ORIENTATION` The name of the Intent-extra used to control the orientation of a ViewImage or a MovieView. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_SHOW_ACTION_ICONS` The name of an Intent-extra used to control the UI of a ViewImage. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_SIZE_LIMIT` Specify the maximum allowed size. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_VIDEO_QUALITY` The name of the Intent-extra used to control the quality of a recorded video. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH` An intent to perform a search for music media and automatically play content from the result when possible. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#INTENT_ACTION_MEDIA_SEARCH` Activity Action: Perform a search for media. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#INTENT_ACTION_MUSIC_PLAYER` *This constant was deprecated in API level 15. Use `https://developer.android.com/reference/android/content/Intent#CATEGORY_APP_MUSIC` instead.* |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#INTENT_ACTION_STILL_IMAGE_CAMERA` The name of the Intent action used to launch a camera in still image mode. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE` The name of the Intent action used to launch a camera in still image mode for use when the device is secured (e.g. with a pin, password, pattern, or face unlock). |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#INTENT_ACTION_TEXT_OPEN_FROM_SEARCH` An intent to perform a search for readable media and automatically play content from the result when possible. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#INTENT_ACTION_VIDEO_CAMERA` The name of the Intent action used to launch a camera in video mode. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#INTENT_ACTION_VIDEO_PLAY_FROM_SEARCH` An intent to perform a search for video media and automatically play content from the result when possible. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID` One of the `https://developer.android.com/reference/android/os/Bundle` keys for `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_ALBUM` specifying the photopicker album for which the app can request to show highlighted media results in the photopicker. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_SEARCH_TEXT_QUERY` One of the `https://developer.android.com/reference/android/os/Bundle` keys for `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_SEARCH_RESULTS` specifying the input query for which the app can request to show highlighted media results in the photopicker. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_TYPE` One of the `https://developer.android.com/reference/android/os/Bundle` keys for `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_SEARCH_RESULTS` and `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_ALBUM` to specify the highlight type i.e. |
| `int` | `https://developer.android.com/reference/android/provider/MediaStore#MATCH_DEFAULT` Value indicating that the default matching behavior should be used, as defined by the key documentation. |
| `int` | `https://developer.android.com/reference/android/provider/MediaStore#MATCH_EXCLUDE` Value indicating that operations should exclude items matching the criteria defined by this key. |
| `int` | `https://developer.android.com/reference/android/provider/MediaStore#MATCH_INCLUDE` Value indicating that operations should include items matching the criteria defined by this key. |
| `int` | `https://developer.android.com/reference/android/provider/MediaStore#MATCH_ONLY` Value indicating that operations should only operate on items explicitly matching the criteria defined by this key. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#MEDIA_IGNORE_FILENAME` Name of the file signaling the media scanner to ignore media in the containing directory and its subdirectories. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#MEDIA_SCANNER_VOLUME` Name of current volume being scanned by the media scanner. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#META_DATA_REVIEW_GALLERY_PREWARM_SERVICE` Name under which an activity handling `https://developer.android.com/reference/android/provider/MediaStore#ACTION_REVIEW` or `https://developer.android.com/reference/android/provider/MediaStore#ACTION_REVIEW_SECURE` publishes the service name for its prewarm service. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#META_DATA_STILL_IMAGE_CAMERA_PREWARM_SERVICE` Name under which an activity handling `https://developer.android.com/reference/android/provider/MediaStore#INTENT_ACTION_STILL_IMAGE_CAMERA` or `https://developer.android.com/reference/android/provider/MediaStore#INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE` publishes the service name for its prewarm service. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_ALBUM_CAMERA` One of the possible album highlight values for `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID` in case an app chooses to highlight media results from an album, in this case, the Camera album. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_ALBUM_DOWNLOADS` One of the possible album highlight values for `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID` in case an app chooses to highlight media results from an album, in this case, the Downloads album. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_ALBUM_FAVORITES` One of the possible album highlight values for `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID` in case an app chooses to highlight media results from an album, in this case, the Favorites album. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_ALBUM_SCREENSHOTS` One of the possible album highlight values for `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID` in case an app chooses to highlight media results from from an album, in this case, the Screenshots album. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_ALBUM_VIDEOS` One of the possible album highlight values for `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID` in case an app chooses to highlight media results from an album, in this case, the Videos album. |
| `int` | `https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_TYPE_COLLAPSED` One of the permitted values for `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_TYPE` to highlight media results as a highlighted media section in the photopicker based on the given input query in `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_SEARCH_TEXT_QUERY` or the given input photopicker album in MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID}. |
| `int` | `https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_TYPE_EXPANDED` One of the permitted values for `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_TYPE` to show a highlighted media results grid based on the given input query in `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_SEARCH_TEXT_QUERY` or the given input photopicker album in MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID}. |
| `int` | `https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_TAB_ALBUMS` One of the permitted values for `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_LAUNCH_TAB` to open the picker with albums tab. |
| `int` | `https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_TAB_IMAGES` One of the permitted values for `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_LAUNCH_TAB` to open the picker with photos tab. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#QUERY_ARG_INCLUDE_RECENTLY_UNMOUNTED_VOLUMES` Flag that requests `https://developer.android.com/reference/android/content/ContentResolver#query(android.net.Uri,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)` to include content from recently unmounted volumes. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#QUERY_ARG_LATEST_SELECTION_ONLY` Flag that indicates if only the latest selection in the photoPicker for the calling app should be returned. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#QUERY_ARG_MATCH_FAVORITE` Specify how `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#IS_FAVORITE` items should be filtered when performing a `https://developer.android.com/reference/android/provider/MediaStore` operation. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#QUERY_ARG_MATCH_PENDING` Specify how `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#IS_PENDING` items should be filtered when performing a `https://developer.android.com/reference/android/provider/MediaStore` operation. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#QUERY_ARG_MATCH_TRASHED` Specify how `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#IS_TRASHED` items should be filtered when performing a `https://developer.android.com/reference/android/provider/MediaStore` operation. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#QUERY_ARG_MEDIA_STANDARD_SORT_ORDER` Flag that requests `https://developer.android.com/reference/android/content/ContentResolver#query(android.net.Uri,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)` to sort the result in descending order based on `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#INFERRED_DATE`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#QUERY_ARG_RELATED_URI` Specify a `https://developer.android.com/reference/android/net/Uri` that is "related" to the current operation being performed. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#UNKNOWN_STRING` The string that is used when a media attribute is not known. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#VOLUME_EXTERNAL` Synthetic volume name that provides a view of all content across the "external" storage of the device. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#VOLUME_EXTERNAL_PRIMARY` Specific volume name that represents the primary external storage device at `https://developer.android.com/reference/android/os/Environment#getExternalStorageDirectory()`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/MediaStore#VOLUME_INTERNAL` Synthetic volume name that provides a view of all content across the "internal" storage of the device. |

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/net/Uri` | `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY_URI` A content:// style uri to the authority for the media provider |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/provider/MediaStore#MediaStore()() ` |

| ### Public methods ||
|---|---|
| ` static boolean` | ` https://developer.android.com/reference/android/provider/MediaStore#canManageMedia(android.content.Context)(https://developer.android.com/reference/android/content/Context context) ` Returns whether the calling app is granted `https://developer.android.com/reference/android/Manifest.permission#MANAGE_MEDIA` or not. |
| ` static https://developer.android.com/reference/android/app/PendingIntent` | ` https://developer.android.com/reference/android/provider/MediaStore#createDeleteRequest(android.content.ContentResolver,%20java.util.Collection<android.net.Uri>)(https://developer.android.com/reference/android/content/ContentResolver resolver, https://developer.android.com/reference/java/util/Collection<https://developer.android.com/reference/android/net/Uri> uris) ` Create a `https://developer.android.com/reference/android/app/PendingIntent` that will prompt the user to permanently delete the requested media items. |
| ` static https://developer.android.com/reference/android/app/PendingIntent` | ` https://developer.android.com/reference/android/provider/MediaStore#createFavoriteRequest(android.content.ContentResolver,%20java.util.Collection<android.net.Uri>,%20boolean)(https://developer.android.com/reference/android/content/ContentResolver resolver, https://developer.android.com/reference/java/util/Collection<https://developer.android.com/reference/android/net/Uri> uris, boolean value) ` Create a `https://developer.android.com/reference/android/app/PendingIntent` that will prompt the user to favorite the requested media items. |
| ` static https://developer.android.com/reference/android/app/PendingIntent` | ` https://developer.android.com/reference/android/provider/MediaStore#createTrashRequest(android.content.ContentResolver,%20java.util.Collection<android.net.Uri>,%20boolean)(https://developer.android.com/reference/android/content/ContentResolver resolver, https://developer.android.com/reference/java/util/Collection<https://developer.android.com/reference/android/net/Uri> uris, boolean value) ` Create a `https://developer.android.com/reference/android/app/PendingIntent` that will prompt the user to trash the requested media items. |
| ` static https://developer.android.com/reference/android/app/PendingIntent` | ` https://developer.android.com/reference/android/provider/MediaStore#createWriteRequest(android.content.ContentResolver,%20java.util.Collection<android.net.Uri>)(https://developer.android.com/reference/android/content/ContentResolver resolver, https://developer.android.com/reference/java/util/Collection<https://developer.android.com/reference/android/net/Uri> uris) ` Create a `https://developer.android.com/reference/android/app/PendingIntent` that will prompt the user to grant your app write access for the requested media items. |
| ` static https://developer.android.com/reference/android/net/Uri` | ` https://developer.android.com/reference/android/provider/MediaStore#getDocumentUri(android.content.Context,%20android.net.Uri)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/net/Uri mediaUri) ` Return a `https://developer.android.com/reference/android/provider/DocumentsProvider` Uri that is an equivalent to the given `https://developer.android.com/reference/android/provider/MediaStore` Uri. |
| ` static https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/String>` | ` https://developer.android.com/reference/android/provider/MediaStore#getExternalVolumeNames(android.content.Context)(https://developer.android.com/reference/android/content/Context context) ` Return list of all specific volume names that make up `https://developer.android.com/reference/android/provider/MediaStore#VOLUME_EXTERNAL`. |
| ` static long` | ` https://developer.android.com/reference/android/provider/MediaStore#getGeneration(android.content.Context,%20java.lang.String)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/java/lang/String volumeName) ` Return the latest generation value for the given volume. |
| ` static https://developer.android.com/reference/android/net/Uri` | ` https://developer.android.com/reference/android/provider/MediaStore#getMediaScannerUri()() ` Uri for querying the state of the media scanner. |
| ` static https://developer.android.com/reference/android/net/Uri` | ` https://developer.android.com/reference/android/provider/MediaStore#getMediaUri(android.content.Context,%20android.net.Uri)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/net/Uri documentUri) ` Return a `https://developer.android.com/reference/android/provider/MediaStore` Uri that is an equivalent to the given `https://developer.android.com/reference/android/provider/DocumentsProvider` Uri. |
| ` static https://developer.android.com/reference/android/os/ParcelFileDescriptor` | ` https://developer.android.com/reference/android/provider/MediaStore#getOriginalMediaFormatFileDescriptor(android.content.Context,%20android.os.ParcelFileDescriptor)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/os/ParcelFileDescriptor fileDescriptor) ` Returns `https://developer.android.com/reference/android/os/ParcelFileDescriptor` representing the original media file format for `fileDescriptor`. |
| ` static https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/provider/MediaStore#getPackageForSearchMediaService(android.content.ContentResolver)(https://developer.android.com/reference/android/content/ContentResolver resolver) ` Gets the package name of the `https://developer.android.com/` that client apps use to connect. |
| ` static int` | ` https://developer.android.com/reference/android/provider/MediaStore#getPickImagesMaxLimit()() ` The maximum limit for the number of items that can be selected using `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES` when launched in multiple selection mode. |
| ` static https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/String>` | ` https://developer.android.com/reference/android/provider/MediaStore#getRecentExternalVolumeNames(android.content.Context)(https://developer.android.com/reference/android/content/Context context) ` Return list of all recent volume names that have been part of `https://developer.android.com/reference/android/provider/MediaStore#VOLUME_EXTERNAL`. |
| ` static https://developer.android.com/reference/android/net/Uri` | ` https://developer.android.com/reference/android/provider/MediaStore#getRedactedUri(android.content.ContentResolver,%20android.net.Uri)(https://developer.android.com/reference/android/content/ContentResolver resolver, https://developer.android.com/reference/android/net/Uri uri) ` Returns an EXIF redacted version of `uri` i.e. |
| ` static https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/Uri>` | ` https://developer.android.com/reference/android/provider/MediaStore#getRedactedUri(android.content.ContentResolver,%20java.util.List<android.net.Uri>)(https://developer.android.com/reference/android/content/ContentResolver resolver, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/Uri> uris) ` Returns a list of EXIF redacted version of `uris` i.e. |
| ` static boolean` | ` https://developer.android.com/reference/android/provider/MediaStore#getRequireOriginal(android.net.Uri)(https://developer.android.com/reference/android/net/Uri uri) ` Return if the caller requires the original file contents when calling `https://developer.android.com/reference/android/content/ContentResolver#openFileDescriptor(android.net.Uri,%20java.lang.String)`. |
| ` static https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/provider/MediaStore#getVersion(android.content.Context,%20java.lang.String)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/java/lang/String volumeName) ` Return an opaque version string describing the `https://developer.android.com/reference/android/provider/MediaStore` state. |
| ` static https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/provider/MediaStore#getVersion(android.content.Context)(https://developer.android.com/reference/android/content/Context context) ` Return an opaque version string describing the `https://developer.android.com/reference/android/provider/MediaStore` state. |
| ` static https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/provider/MediaStore#getVolumeName(android.net.Uri)(https://developer.android.com/reference/android/net/Uri uri) ` Return the volume name that the given `https://developer.android.com/reference/android/net/Uri` references. |
| ` static boolean` | ` https://developer.android.com/reference/android/provider/MediaStore#isCurrentCloudMediaProviderAuthority(android.content.ContentResolver,%20java.lang.String)(https://developer.android.com/reference/android/content/ContentResolver resolver, https://developer.android.com/reference/java/lang/String authority) ` Returns `true` if and only if the caller with `authority` is the currently enabled `https://developer.android.com/reference/android/provider/CloudMediaProvider`. |
| ` static boolean` | ` https://developer.android.com/reference/android/provider/MediaStore#isCurrentSystemGallery(android.content.ContentResolver,%20int,%20java.lang.String)(https://developer.android.com/reference/android/content/ContentResolver resolver, int uid, https://developer.android.com/reference/java/lang/String packageName) ` Returns true if the given application is the current system gallery of the device. |
| ` static boolean` | ` https://developer.android.com/reference/android/provider/MediaStore#isSupportedCloudMediaProviderAuthority(android.content.ContentResolver,%20java.lang.String)(https://developer.android.com/reference/android/content/ContentResolver resolver, https://developer.android.com/reference/java/lang/String authority) ` Returns `true` if and only if the caller with `authority` is a supported `https://developer.android.com/reference/android/provider/CloudMediaProvider`. |
| ` static void` | ` https://developer.android.com/reference/android/provider/MediaStore#markIsFavoriteStatus(android.content.ContentResolver,%20java.util.Collection<android.net.Uri>,%20boolean)(https://developer.android.com/reference/android/content/ContentResolver resolver, https://developer.android.com/reference/java/util/Collection<https://developer.android.com/reference/android/net/Uri> uris, boolean areFavorites) ` Sets the media isFavorite status if the calling app has wider read permission on media files for given type. |
| ` static void` | ` https://developer.android.com/reference/android/provider/MediaStore#notifyCloudMediaChangedEvent(android.content.ContentResolver,%20java.lang.String,%20java.lang.String)(https://developer.android.com/reference/android/content/ContentResolver resolver, https://developer.android.com/reference/java/lang/String authority, https://developer.android.com/reference/java/lang/String currentMediaCollectionId) ` Notifies the OS about a cloud media event requiring a full or incremental media collection sync for the currently enabled cloud provider, `authority`. |
| ` static https://developer.android.com/reference/android/content/res/AssetFileDescriptor` | ` https://developer.android.com/reference/android/provider/MediaStore#openAssetFileDescriptor(android.content.ContentResolver,%20android.net.Uri,%20java.lang.String,%20android.os.CancellationSignal)(https://developer.android.com/reference/android/content/ContentResolver resolver, https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String mode, https://developer.android.com/reference/android/os/CancellationSignal cancellationSignal) ` Works exactly the same as `https://developer.android.com/reference/android/content/ContentResolver#openAssetFileDescriptor(android.net.Uri,%20java.lang.String,%20android.os.CancellationSignal)`, but only works for `https://developer.android.com/reference/android/net/Uri` whose scheme is `https://developer.android.com/reference/android/content/ContentResolver#SCHEME_CONTENT` and its authority is `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY`. |
| ` static https://developer.android.com/reference/android/os/ParcelFileDescriptor` | ` https://developer.android.com/reference/android/provider/MediaStore#openFileDescriptor(android.content.ContentResolver,%20android.net.Uri,%20java.lang.String,%20android.os.CancellationSignal)(https://developer.android.com/reference/android/content/ContentResolver resolver, https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String mode, https://developer.android.com/reference/android/os/CancellationSignal cancellationSignal) ` Works exactly the same as `https://developer.android.com/reference/android/content/ContentResolver#openFileDescriptor(android.net.Uri,%20java.lang.String,%20android.os.CancellationSignal)`, but only works for `https://developer.android.com/reference/android/net/Uri` whose scheme is `https://developer.android.com/reference/android/content/ContentResolver#SCHEME_CONTENT` and its authority is `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY`. |
| ` static https://developer.android.com/reference/android/content/res/AssetFileDescriptor` | ` https://developer.android.com/reference/android/provider/MediaStore#openTypedAssetFileDescriptor(android.content.ContentResolver,%20android.net.Uri,%20java.lang.String,%20android.os.Bundle,%20android.os.CancellationSignal)(https://developer.android.com/reference/android/content/ContentResolver resolver, https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String mimeType, https://developer.android.com/reference/android/os/Bundle opts, https://developer.android.com/reference/android/os/CancellationSignal cancellationSignal) ` Works exactly the same as `https://developer.android.com/reference/android/content/ContentResolver#openTypedAssetFileDescriptor(android.net.Uri,%20java.lang.String,%20android.os.Bundle,%20android.os.CancellationSignal)`, but only works for `https://developer.android.com/reference/android/net/Uri` whose scheme is `https://developer.android.com/reference/android/content/ContentResolver#SCHEME_CONTENT` and its authority is `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY`. |
| ` static https://developer.android.com/reference/android/database/Cursor` | ` https://developer.android.com/reference/android/provider/MediaStore#queryDeletedFiles(android.content.ContentResolver,%20android.os.Bundle,%20android.os.CancellationSignal)(https://developer.android.com/reference/android/content/ContentResolver resolver, https://developer.android.com/reference/android/os/Bundle queryArgs, https://developer.android.com/reference/android/os/CancellationSignal signal) ` Returns a cursor of deleted items matching the given query arguments. |
| ` static https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/provider/MediaStore#restoreFileFromTrash(android.content.ContentResolver,%20java.lang.String,%20java.lang.String)(https://developer.android.com/reference/android/content/ContentResolver resolver, https://developer.android.com/reference/java/lang/String path, https://developer.android.com/reference/java/lang/String targetPath) ` Restores a file or directory from a trashed state. |
| ` static https://developer.android.com/reference/android/net/Uri` | ` https://developer.android.com/reference/android/provider/MediaStore#setIncludePending(android.net.Uri)(https://developer.android.com/reference/android/net/Uri uri) ` *This method was deprecated in API level 30. consider migrating to `https://developer.android.com/reference/android/provider/MediaStore#QUERY_ARG_MATCH_PENDING` which is more expressive.* |
| ` static https://developer.android.com/reference/android/net/Uri` | ` https://developer.android.com/reference/android/provider/MediaStore#setRequireOriginal(android.net.Uri)(https://developer.android.com/reference/android/net/Uri uri) ` Update the given `https://developer.android.com/reference/android/net/Uri` to indicate that the caller requires the original file contents when calling `https://developer.android.com/reference/android/content/ContentResolver#openFileDescriptor(android.net.Uri,%20java.lang.String)`. |
| ` static https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/provider/MediaStore#trashFile(android.content.ContentResolver,%20java.lang.String)(https://developer.android.com/reference/android/content/ContentResolver resolver, https://developer.android.com/reference/java/lang/String path) ` Moves a file or directory to a trashed state. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Constants

### ACCESS_MEDIA_OWNER_PACKAGE_NAME_PERMISSION

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

```
public static final String ACCESS_MEDIA_OWNER_PACKAGE_NAME_PERMISSION
```

Permission that grants access to `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#OWNER_PACKAGE_NAME`
of every accessible media file.

<br />

Constant Value:

"com.android.providers.media.permission.ACCESS_MEDIA_OWNER_PACKAGE_NAME"


### ACCESS_OEM_METADATA_PERMISSION

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [T Extensions 15](https://developer.android.com/sdkExtensions)

```
public static final String ACCESS_OEM_METADATA_PERMISSION
```

Permission that grants access to `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#OEM_METADATA`
of every accessible media file.

<br />

Constant Value:

"com.android.providers.media.permission.ACCESS_OEM_METADATA"


### ACTION_IMAGE_CAPTURE

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

```
public static final String ACTION_IMAGE_CAPTURE
```

Standard Intent action that can be sent to have the camera application
capture an image and return it.


The caller may pass an extra EXTRA_OUTPUT to control where this image will be written.
If the EXTRA_OUTPUT is not present, then a small sized image is returned as a Bitmap
object in the extra field. This is useful for applications that only need a small image.
If the EXTRA_OUTPUT is present, then the full-sized image will be written to the Uri
value of EXTRA_OUTPUT.
As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#LOLLIPOP`, this uri can also be supplied through
`https://developer.android.com/reference/android/content/Intent#setClipData(android.content.ClipData)`. If using this approach, you still must
supply the uri through the EXTRA_OUTPUT field for compatibility with old applications.
If you don't set a ClipData, it will be copied there for you when calling
`https://developer.android.com/reference/android/content/Context#startActivity(android.content.Intent)`.


Regardless of whether or not EXTRA_OUTPUT is present, when an image is captured via this
intent, `https://developer.android.com/reference/android/hardware/Camera#ACTION_NEW_PICTURE` won't be broadcasted.


Note: if you app targets `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M` and above
and declares as using the `https://developer.android.com/reference/android/Manifest.permission#CAMERA` permission which
is not granted, then attempting to use this action will result in a `https://developer.android.com/reference/java/lang/SecurityException`.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_OUTPUT`
- `https://developer.android.com/reference/android/hardware/Camera#ACTION_NEW_PICTURE`

Constant Value:

"android.media.action.IMAGE_CAPTURE"


### ACTION_IMAGE_CAPTURE_SECURE

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

```
public static final String ACTION_IMAGE_CAPTURE_SECURE
```

Intent action that can be sent to have the camera application capture an image and return
it when the device is secured (e.g. with a pin, password, pattern, or face unlock).
Applications responding to this intent must not expose any personal content like existing
photos or videos on the device. The applications should be careful not to share any photo
or video with other applications or Internet. The activity should use `https://developer.android.com/reference/android/app/Activity#setShowWhenLocked(boolean)` to display on top of the
lock screen while secured. There is no activity stack when this flag is used, so
launching more than one activity is strongly discouraged.


The caller may pass an extra EXTRA_OUTPUT to control where this image will be written.
If the EXTRA_OUTPUT is not present, then a small sized image is returned as a Bitmap
object in the extra field. This is useful for applications that only need a small image.
If the EXTRA_OUTPUT is present, then the full-sized image will be written to the Uri
value of EXTRA_OUTPUT.
As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#LOLLIPOP`, this uri can also be supplied through
`https://developer.android.com/reference/android/content/Intent#setClipData(android.content.ClipData)`. If using this approach, you still must
supply the uri through the EXTRA_OUTPUT field for compatibility with old applications.
If you don't set a ClipData, it will be copied there for you when calling
`https://developer.android.com/reference/android/content/Context#startActivity(android.content.Intent)`.


Regardless of whether or not EXTRA_OUTPUT is present, when an image is captured via this
intent, `https://developer.android.com/reference/android/hardware/Camera#ACTION_NEW_PICTURE` won't be broadcasted.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#ACTION_IMAGE_CAPTURE`
- `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_OUTPUT`
- `https://developer.android.com/reference/android/hardware/Camera#ACTION_NEW_PICTURE`

Constant Value:

"android.media.action.IMAGE_CAPTURE_SECURE"


### ACTION_MOTION_PHOTO_CAPTURE

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

```
public static final String ACTION_MOTION_PHOTO_CAPTURE
```

Standard Intent action that can be sent to have the camera application
capture a
[motion photo](https://developer.android.com/media/platform/motion-photo-format) and
return it.


The caller must either pass an extra EXTRA_OUTPUT to control where the image will be written,
or a uri through `https://developer.android.com/reference/android/content/Intent#setClipData(android.content.ClipData)`. If you don't set a
ClipData, it will be copied there for you when calling `https://developer.android.com/reference/android/content/Context#startActivity(android.content.Intent)`.


When an image is captured via this intent, `https://developer.android.com/reference/android/hardware/Camera#ACTION_NEW_PICTURE`
won't be broadcasted.


Note: If your app declares as using the `https://developer.android.com/reference/android/Manifest.permission#CAMERA` permission
which is not granted, then attempting to use this action will result in a `https://developer.android.com/reference/java/lang/SecurityException`.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_OUTPUT`

Constant Value:

"android.provider.action.MOTION_PHOTO_CAPTURE"


### ACTION_MOTION_PHOTO_CAPTURE_SECURE

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

```
public static final String ACTION_MOTION_PHOTO_CAPTURE_SECURE
```

Intent action that can be sent to have the camera application capture a
[motion photo](https://developer.android.com/media/platform/motion-photo-format) and
return it when the device is secured (e.g. with a pin, password, pattern, or face unlock).
Applications responding to this intent must not expose any personal content like existing
photos or videos on the device. The applications should be careful not to share any photo
or video with other applications or Internet. The activity should use `https://developer.android.com/reference/android/app/Activity#setShowWhenLocked(boolean)` to display on top of the
lock screen while secured. There is no activity stack when this flag is used, so
launching more than one activity is strongly discouraged.


The caller must either pass an extra EXTRA_OUTPUT to control where the image will be written,
or a uri through `https://developer.android.com/reference/android/content/Intent#setClipData(android.content.ClipData)`. If you don't set a
ClipData, it will be copied there for you when calling `https://developer.android.com/reference/android/content/Context#startActivity(android.content.Intent)`.


When an image is captured via this intent, `https://developer.android.com/reference/android/hardware/Camera#ACTION_NEW_PICTURE`
won't be broadcasted.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#ACTION_MOTION_PHOTO_CAPTURE`
- `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_OUTPUT`

Constant Value:

"android.provider.action.MOTION_PHOTO_CAPTURE_SECURE"


### ACTION_PICK_IMAGES

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [R Extensions 2](https://developer.android.com/sdkExtensions)

```
public static final String ACTION_PICK_IMAGES
```

Activity Action: Allow the user to select images or videos provided by system and return it.
This is different than `https://developer.android.com/reference/android/content/Intent#ACTION_PICK` and `https://developer.android.com/reference/android/content/Intent#ACTION_GET_CONTENT` in
that

- the data for this action is provided by the system
- this action is only used for picking images and videos
- caller gets read access to user picked items even without storage permissions

Callers can optionally specify MIME type (such as `image/*` or `video/*`),
resulting in a range of content selection that the caller is interested in. The optional MIME
type can be requested with `https://developer.android.com/reference/android/content/Intent#setType(java.lang.String)`.

If the caller needs multiple returned items (or caller wants to allow multiple selection),
then it can specify `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_MAX` to indicate this.

When the caller requests multiple selection, the value of `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_MAX` must be a positive integer greater than 1 and less than or
equal to `https://developer.android.com/reference/android/provider/MediaStore#getPickImagesMaxLimit()`, otherwise `https://developer.android.com/reference/android/app/Activity#RESULT_CANCELED`
is returned. Use `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_IN_ORDER` in multiple selection mode to
allow the user to pick images in order.

If the caller needs to specify the `https://developer.android.com/reference/android/media/ApplicationMediaCapabilities` that should be
used while picking video files, use `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_MEDIA_CAPABILITIES` to indicate
this.

When the requested file format does not match the capabilities specified by caller and
the video duration is within the range that the system can handle, it will get transcoded to
a default supported format, otherwise, the caller will receive the original file.

Callers may use `https://developer.android.com/reference/android/content/Intent#EXTRA_LOCAL_ONLY` to limit content selection to local data.

For system stability, it is preferred to open the URIs obtained from using this action
by calling
`https://developer.android.com/reference/android/provider/MediaStore#openFileDescriptor(android.content.ContentResolver,%20android.net.Uri,%20java.lang.String,%20android.os.CancellationSignal)`,
`https://developer.android.com/reference/android/provider/MediaStore#openAssetFileDescriptor(android.content.ContentResolver,%20android.net.Uri,%20java.lang.String,%20android.os.CancellationSignal)` or
`https://developer.android.com/reference/android/provider/MediaStore#openTypedAssetFileDescriptor(android.content.ContentResolver,%20android.net.Uri,%20java.lang.String,%20android.os.Bundle,%20android.os.CancellationSignal)`
instead of `https://developer.android.com/reference/android/content/ContentResolver` open APIs.

Output: MediaStore content URI(s) of the item(s) that was picked. Unlike other MediaStore
URIs, these are referred to as 'picker' URIs and expose a limited set of read-only
operations. Specifically, picker URIs can only be opened for read and queried for columns in
`https://developer.android.com/reference/android/provider/MediaStore.PickerMediaColumns`.

Before this API, apps could use `https://developer.android.com/reference/android/content/Intent#ACTION_GET_CONTENT`. However, `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES` is now the recommended option for images and videos, since it offers a
better user experience.

<br />

Constant Value:

"android.provider.action.PICK_IMAGES"


### ACTION_PICK_IMAGES_SETTINGS

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [R Extensions 3](https://developer.android.com/sdkExtensions)

```
public static final String ACTION_PICK_IMAGES_SETTINGS
```

Activity Action: Launch settings controlling images or videos selection with
`https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`.

The settings page allows a user to change the enabled `https://developer.android.com/reference/android/provider/CloudMediaProvider` on the
device and other media selection configurations.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`
- `https://developer.android.com/reference/android/provider/MediaStore#isCurrentCloudMediaProviderAuthority(android.content.ContentResolver,%20java.lang.String)`

Constant Value:

"android.provider.action.PICK_IMAGES_SETTINGS"


### ACTION_REVIEW

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

```
public static final String ACTION_REVIEW
```

Standard action that can be sent to review the given media file.


The launched application is expected to provide a large-scale view of the
given media file, while allowing the user to quickly access other
recently captured media files.


Input: `https://developer.android.com/reference/android/content/Intent#getData()` is URI of the primary media item to
initially display.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#ACTION_REVIEW_SECURE`
- `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_BRIGHTNESS`

Constant Value:

"android.provider.action.REVIEW"


### ACTION_REVIEW_SECURE

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

```
public static final String ACTION_REVIEW_SECURE
```

Standard action that can be sent to review the given media file when the
device is secured (e.g. with a pin, password, pattern, or face unlock).
The applications should be careful not to share any media with other
applications or Internet. The activity should use
`https://developer.android.com/reference/android/app/Activity#setShowWhenLocked(boolean)` to display on top of the lock screen
while secured. There is no activity stack when this flag is used, so
launching more than one activity is strongly discouraged.


The launched application is expected to provide a large-scale view of the
given primary media file, while only allowing the user to quickly access
other media from an explicit secondary list.


Input: `https://developer.android.com/reference/android/content/Intent#getData()` is URI of the primary media item to
initially display. `https://developer.android.com/reference/android/content/Intent#getClipData()` is the limited list of
secondary media items that the user is allowed to review. If
`https://developer.android.com/reference/android/content/Intent#getClipData()` is undefined, then no other media access
should be allowed.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_BRIGHTNESS`

Constant Value:

"android.provider.action.REVIEW_SECURE"


### ACTION_VIDEO_CAPTURE

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

```
public static final String ACTION_VIDEO_CAPTURE
```

Standard Intent action that can be sent to have the camera application
capture a video and return it.


The caller may pass in an extra EXTRA_VIDEO_QUALITY to control the video quality.


The caller may pass in an extra EXTRA_OUTPUT to control
where the video is written.

- If EXTRA_OUTPUT is not present, the video will be written to the standard location for videos, and the Uri of that location will be returned in the data field of the Uri. `https://developer.android.com/reference/android/hardware/Camera#ACTION_NEW_VIDEO` will also be broadcasted when the video is recorded.
- If EXTRA_OUTPUT is assigned a Uri value, no `https://developer.android.com/reference/android/hardware/Camera#ACTION_NEW_VIDEO` will be broadcasted. As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#LOLLIPOP`, this uri can also be supplied through `https://developer.android.com/reference/android/content/Intent#setClipData(android.content.ClipData)`. If using this approach, you still must supply the uri through the EXTRA_OUTPUT field for compatibility with old applications. If you don't set a ClipData, it will be copied there for you when calling `https://developer.android.com/reference/android/content/Context#startActivity(android.content.Intent)`.

Note: if you app targets `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M` and above
and declares as using the `https://developer.android.com/reference/android/Manifest.permission#CAMERA` permission which
is not granted, then atempting to use this action will result in a `https://developer.android.com/reference/java/lang/SecurityException`.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_OUTPUT`
- `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_VIDEO_QUALITY`
- `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_SIZE_LIMIT`
- `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_DURATION_LIMIT`
- `https://developer.android.com/reference/android/hardware/Camera#ACTION_NEW_VIDEO`

Constant Value:

"android.media.action.VIDEO_CAPTURE"


### AUTHORITY

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

```
public static final String AUTHORITY
```

The authority for the media provider

<br />

Constant Value:

"media"


### EXTRA_ACCEPT_ORIGINAL_MEDIA_FORMAT

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

```
public static final String EXTRA_ACCEPT_ORIGINAL_MEDIA_FORMAT
```

/\*\*
Specify that the caller wants to receive the original media format without transcoding.

**Caution: using this flag can cause app
compatibility issues whenever Android adds support for new media formats.**
Clients should instead specify their supported media capabilities explicitly
in their manifest or with the `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_MEDIA_CAPABILITIES` `open` flag.

This option is useful for apps that don't attempt to parse the actual byte contents of media
files, such as playback using `https://developer.android.com/reference/android/media/MediaPlayer` or for off-device backup. Note that the
`https://developer.android.com/reference/android/Manifest.permission#ACCESS_MEDIA_LOCATION` permission will still be required
to avoid sensitive metadata redaction, similar to `https://developer.android.com/reference/android/provider/MediaStore#setRequireOriginal(android.net.Uri)`.


Note that this flag overrides any explicitly declared `media_capabilities.xml` or
`https://developer.android.com/reference/android/media/ApplicationMediaCapabilities` extras specified in the same `open` request.

This option can be added to the `opts` `https://developer.android.com/reference/android/os/Bundle` in various
`https://developer.android.com/reference/android/content/ContentResolver` `open` methods.

<br />

**See also:**

- `https://developer.android.com/reference/android/content/ContentResolver#openTypedAssetFileDescriptor(android.net.Uri,%20java.lang.String,%20android.os.Bundle)`
- `https://developer.android.com/reference/android/content/ContentResolver#openTypedAssetFile(android.net.Uri,%20java.lang.String,%20android.os.Bundle,%20android.os.CancellationSignal)`
- `https://developer.android.com/reference/android/provider/MediaStore#setRequireOriginal(android.net.Uri)`
- `https://developer.android.com/reference/android/provider/MediaStore#getOriginalMediaFormatFileDescriptor(android.content.Context,%20android.os.ParcelFileDescriptor)`

Constant Value:

"android.provider.extra.ACCEPT_ORIGINAL_MEDIA_FORMAT"


### EXTRA_BRIGHTNESS

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

```
public static final String EXTRA_BRIGHTNESS
```

When defined, the launched application is requested to set the given
brightness value via
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#screenBrightness` to help
ensure a smooth transition when launching `https://developer.android.com/reference/android/provider/MediaStore#ACTION_REVIEW` or
`https://developer.android.com/reference/android/provider/MediaStore#ACTION_REVIEW_SECURE` intents.

<br />

Constant Value:

"android.provider.extra.BRIGHTNESS"


### EXTRA_DURATION_LIMIT

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

```
public static final String EXTRA_DURATION_LIMIT
```

Specify the maximum allowed recording duration in seconds.

<br />

Constant Value:

"android.intent.extra.durationLimit"


### EXTRA_FINISH_ON_COMPLETION

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

```
public static final String EXTRA_FINISH_ON_COMPLETION
```

The name of the Intent-extra used to control the onCompletion behavior of a MovieView. This
is a boolean property that specifies whether or not to finish the MovieView activity when the
movie completes playing. The default value is true, which means to automatically exit the
movie player activity when the movie completes playing.

<br />

Constant Value:

"android.intent.extra.finishOnCompletion"


### EXTRA_FULL_SCREEN

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

```
public static final String EXTRA_FULL_SCREEN
```

The name of an Intent-extra used to control the UI of a ViewImage.
This is a boolean property that overrides the activity's default fullscreen state.

<br />

Constant Value:

"android.intent.extra.fullScreen"


### EXTRA_MEDIA_ALBUM

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

```
public static final String EXTRA_MEDIA_ALBUM
```

The name of the Intent-extra used to define the album

<br />

Constant Value:

"android.intent.extra.album"


### EXTRA_MEDIA_ARTIST

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

```
public static final String EXTRA_MEDIA_ARTIST
```

The name of the Intent-extra used to define the artist

<br />

Constant Value:

"android.intent.extra.artist"


### EXTRA_MEDIA_CAPABILITIES

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

```
public static final String EXTRA_MEDIA_CAPABILITIES
```

Specify the `https://developer.android.com/reference/android/media/ApplicationMediaCapabilities` that should be used while opening a media
or picking media files.

If the capabilities specified matches the format of the original file, the app will
receive the original file, otherwise, it will get transcoded to a default supported format.

When used while opening a media, add this option to the `opts` `https://developer.android.com/reference/android/os/Bundle` in
various `https://developer.android.com/reference/android/content/ContentResolver` `open` methods. This flag takes higher precedence over
the applications declared `media_capabilities.xml` and is useful for apps that want to
have more granular control over their supported media capabilities.

When used while picking media files, add this option to the intent-extra of
`https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`.

<br />

**See also:**

- `https://developer.android.com/reference/android/content/ContentResolver#openTypedAssetFileDescriptor(android.net.Uri,%20java.lang.String,%20android.os.Bundle)`
- `https://developer.android.com/reference/android/content/ContentResolver#openTypedAssetFile(android.net.Uri,%20java.lang.String,%20android.os.Bundle,%20android.os.CancellationSignal)`
- `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`

Constant Value:

"android.provider.extra.MEDIA_CAPABILITIES"


### EXTRA_MEDIA_CAPABILITIES_UID

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

```
public static final String EXTRA_MEDIA_CAPABILITIES_UID
```

Specify the UID of the app that should be used to determine supported media capabilities
while opening a media.

If this specified UID is found to be capable of handling the original media file format, the
app will receive the original file, otherwise, the file will get transcoded to a default
format supported by the specified UID.

<br />

Constant Value:

"android.provider.extra.MEDIA_CAPABILITIES_UID"


### EXTRA_MEDIA_FOCUS

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

```
public static final String EXTRA_MEDIA_FOCUS
```

The name of the Intent-extra used to define the search focus. The search focus
indicates whether the search should be for things related to the artist, album
or song that is identified by the other extras.

<br />

Constant Value:

"android.intent.extra.focus"


### EXTRA_MEDIA_GENRE

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

```
public static final String EXTRA_MEDIA_GENRE
```

The name of the Intent-extra used to define the genre.

<br />

Constant Value:

"android.intent.extra.genre"


### EXTRA_MEDIA_PLAYLIST

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

```
public static final String EXTRA_MEDIA_PLAYLIST
```


**This constant was deprecated
in API level 31.**   

Android playlists are now deprecated. We will keep the current
functionality for compatibility resons, but we will no longer take feature
request. We do not advise adding new usages of Android Playlists. M3U files can
be used as an alternative.

The name of the Intent-extra used to define the playlist.

<br />

Constant Value:

"android.intent.extra.playlist"


### EXTRA_MEDIA_RADIO_CHANNEL

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

```
public static final String EXTRA_MEDIA_RADIO_CHANNEL
```

The name of the Intent-extra used to define the radio channel.

<br />

Constant Value:

"android.intent.extra.radio_channel"


### EXTRA_MEDIA_TITLE

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

```
public static final String EXTRA_MEDIA_TITLE
```

The name of the Intent-extra used to define the song title

<br />

Constant Value:

"android.intent.extra.title"


### EXTRA_OUTPUT

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

```
public static final String EXTRA_OUTPUT
```

The name of the Intent-extra used to indicate a content resolver Uri to be used to
store the requested image or video.

<br />

Constant Value:

"output"


### EXTRA_PICKER_PRE_SELECTION_URIS

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [R Extensions 15](https://developer.android.com/sdkExtensions)

```
public static final String EXTRA_PICKER_PRE_SELECTION_URIS
```

The name of an optional intent-extra used to specify URIs for pre-selection in photo picker
opened with `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES` in multi-select mode.

Only MediaStore content URI(s) of the item(s) received as a result of
`https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES` action are accepted. The value of this intent-extra
should be an ArrayList of type URIs. Default value is null. Maximum number of URIs
that can be accepted is limited by the value passed in
`https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_MAX` as part of the `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`
intent. In case the count of input URIs is greater than the limit then
`IllegalArgumentException` is thrown.

The provided list will be checked for permissions and authority. Any URI that is
inaccessible, doesn't match the current authorities(local or cloud) or is invalid will be
filtered out. Additionally, items that are disabled based on the provided
`https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_SELECTION_PARAMS` will also be filtered out.

The remaining items will appear selected when the photo picker is opened, provided they
satisfy the aggregate constraints such as `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_MAX` and
`PhotoPickerSelectionParams.getMaxSelectionBatchSizeInBytes()`.
In the case of `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_IN_ORDER` the chronological order of the
input list will be used for ordered selection of the pre-selected items.

This is not a mechanism to revoke permissions for items, i.e. de-selection of a
pre-selected item by the user will not result in revocation of the grant.

<br />

<br />

Constant Value:

"android.provider.extra.PICKER_PRE_SELECTION_URIS"


### EXTRA_PICK_IMAGES_ACCENT_COLOR

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [R Extensions 12](https://developer.android.com/sdkExtensions)

```
public static final String EXTRA_PICK_IMAGES_ACCENT_COLOR
```

The name of an optional intent-extra used to allow apps to specify the picker accent color.
The extra can only be specified in `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`.
The accent color will be used for various primary elements in the PhotoPicker view.
All other colors will be set based on android material guidelines.


The value of this intent extra should be a long color value. The alpha component of the
given color is not taken into account while setting the accent color. We assume full color
opacity.
Only colors with luminance(can also be understood as brightness) greater than 0.05 and
less than 0.9 are permitted.
Luminance of a color is determined using:
luminance = Color.luminance(color)
where color is the input accent color to be set.
Check `https://developer.android.com/` docs for more details on color luminance and long color values.
In case the luminance of the input color is unacceptable, picker colors will be set
based on the colors of the device android theme.
In case of an invalid input color value i.e. the input color cannot be parsed,
`IllegalArgumentException` is thrown.

<br />

Constant Value:

"android.provider.extra.PICK_IMAGES_ACCENT_COLOR"


### EXTRA_PICK_IMAGES_HIGHLIGHT_ALBUM

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final String EXTRA_PICK_IMAGES_HIGHLIGHT_ALBUM
```

The name of an optional intent-extra used to allow apps to highlight media results of a
photopicker album in the photopicker UI whenever feasible based on the given input album in
`https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID`.
The extra can only be specified in `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`.


This intent extra will accept a `https://developer.android.com/reference/android/os/Bundle` object. The bundle object should have two
keys specified.
The first key `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_TYPE` will
specify the type of media highlight the app wants to opt for and should be one of
`https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_TYPE_COLLAPSED` for a highlighted media section to
be shown when the photopicker launches or
`https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_TYPE_EXPANDED` to open the photopicker to show
a highlighted media results grid based on the given input album.
Any other value for this key will result in throwing `IllegalArgumentException`.
The second bundle key `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID`
will specify the album to be highlighted and its value should be one of:
`https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_ALBUM_FAVORITES` for the Favorites album,
`https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_ALBUM_CAMERA` for the Camera album,
`https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_ALBUM_SCREENSHOTS` for the Screenshots album,
`https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_ALBUM_VIDEOS` for the Videos album and
`https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_ALBUM_DOWNLOADS` for the Downloads album.
Any other value for this key will result in throwing `IllegalArgumentException`.
Highlighting media results based on an input string text query is also supported. See
`https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_SEARCH_RESULTS` for more details.
Only one of `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_SEARCH_RESULTS` or
`https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_ALBUM` should be used at any given time.
Specifying both will result in `IllegalArgumentException` to be thrown.

<br />

Constant Value:

"android.provider.extra.PICK_IMAGES_HIGHLIGHT_ALBUM"


### EXTRA_PICK_IMAGES_HIGHLIGHT_SEARCH_RESULTS

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final String EXTRA_PICK_IMAGES_HIGHLIGHT_SEARCH_RESULTS
```

The name of an optional intent-extra used to allow apps to highlight search results in the
photopicker UI whenever feasible based on the given input text query in
`https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_SEARCH_TEXT_QUERY`
The extra can only be specified in `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`.


This intent extra will accept a `https://developer.android.com/reference/android/os/Bundle` object. The bundle object should have two
keys specified.
The first key `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_TYPE` will
specify the type of media highlight the app wants to opt for and should be one of
`https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_TYPE_COLLAPSED` for a highlighted media section to
be shown when the photopicker launches or
`https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_TYPE_EXPANDED` to open the photopicker to show
a highlighted media results grid based on the given input query.
Any other value for this key will result in throwing `IllegalArgumentException`.
The second bundle key `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_SEARCH_TEXT_QUERY`
will accept a string value specifying the query for highlighting media results.
If this input value is empty, the request to highlight media will be ignored and
no highlight will be shown at all. In case of null input query,
`IllegalArgumentException` is thrown.
Highlighting media results of a photopicker album is also supported. See
`https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_ALBUM` for more details.
Only one of `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_SEARCH_RESULTS` or
`https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_ALBUM` should be used at any given time.
Specifying both will result in `IllegalArgumentException` to be thrown.

<br />

Constant Value:

"android.provider.extra.PICK_IMAGES_HIGHLIGHT_SEARCH_RESULTS"


### EXTRA_PICK_IMAGES_IN_ORDER

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [R Extensions 12](https://developer.android.com/sdkExtensions)

```
public static final String EXTRA_PICK_IMAGES_IN_ORDER
```

The name of an optional intent-extra used to allow ordered selection of items. Set this extra
to true to allow the user to see the order of their selected items. The result returned to
the caller will be the same as the user selected order. This extra is only allowed via the
`https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`.

The value of this intent-extra should be a boolean. Default value is false.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`

Constant Value:

"android.provider.extra.PICK_IMAGES_IN_ORDER"


### EXTRA_PICK_IMAGES_LAUNCH_TAB

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [R Extensions 12](https://developer.android.com/sdkExtensions)

```
public static final String EXTRA_PICK_IMAGES_LAUNCH_TAB
```

The name of an optional intent-extra used to allow apps to specify the tab the picker should
open with. The extra can only be specified in `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`.


The value of this intent-extra must be one of: `https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_TAB_ALBUMS`
for the albums tab and `https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_TAB_IMAGES` for the photos tab.
The system will decide which tab to open by default and in most cases,
it is `https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_TAB_IMAGES` i.e. the photos tab.

<br />

Constant Value:

"android.provider.extra.PICK_IMAGES_LAUNCH_TAB"


### EXTRA_PICK_IMAGES_MAX

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [R Extensions 2](https://developer.android.com/sdkExtensions)

```
public static final String EXTRA_PICK_IMAGES_MAX
```

The name of an optional intent-extra used to allow multiple selection of
items and constrain maximum number of items that can be returned by
`https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`, action may still return nothing
(0 items) if the user chooses to cancel.


The value of this intent-extra should be a positive integer greater
than 1 and less than or equal to
`https://developer.android.com/reference/android/provider/MediaStore#getPickImagesMaxLimit()`, otherwise
`https://developer.android.com/reference/android/app/Activity#RESULT_CANCELED` is returned.


If `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICKER_PRE_SELECTION_URIS` is also provided, the number of URIs in
that list must not exceed this value, otherwise an `IllegalIntentExtraException` will
be thrown.

<br />

Constant Value:

"android.provider.extra.PICK_IMAGES_MAX"


### EXTRA_PICK_IMAGES_SELECTION_PARAMS

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

```
public static final String EXTRA_PICK_IMAGES_SELECTION_PARAMS
```

The name of an optional intent-extra used to pass
`https://developer.android.com/reference/android/widget/photopicker/PhotoPickerSelectionParams` to the photo picker. This extra
can only be specified in `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`.


The `https://developer.android.com/reference/android/widget/photopicker/PhotoPickerSelectionParams` object allows the calling
app to set constraints on the media items that can be selected by the user. Media items that
fail to satisfy these constraints will be disabled for selection.


Not passing this EXTRA, means the photo picker will not apply any restrictions on what
media items users can select (except for the MIME type specified in the `https://developer.android.com/reference/android/content/Intent#setType(java.lang.String)` extra).


To use this key, calling apps should construct a
`https://developer.android.com/reference/android/widget/photopicker/PhotoPickerSelectionParams` object using its
`https://developer.android.com/reference/android/widget/photopicker/PhotoPickerSelectionParams.Builder` and pass it as the
value.  

Example: If the calling app wants to allow selection of only those media items that have a
maximum size of 10,000 bytes and a minimum resolution of 500 pixels:

```
 PhotoPickerSelectionParams selectionParams = new PhotoPickerSelectionParams.Builder()
     .setMaxMediaItemSizeInBytes(10000L)
     .setMinMediaItemResolutionInPixels(500L)
     .build();
 Intent intent = new Intent(MediaStore.ACTION_PICK_IMAGES);
 intent.putExtra(MediaStore.EXTRA_PICK_IMAGES_SELECTION_PARAMS, selectionParams);
 
```

<br />

<br />

Constant Value:

"android.provider.extra.PICK_IMAGES_SELECTION_PARAMS"


### EXTRA_PICK_IMAGES_UI_CUSTOMIZATION_PARAMS

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

```
public static final String EXTRA_PICK_IMAGES_UI_CUSTOMIZATION_PARAMS
```

The name of an optional intent-extra used to set the ui customization options in the
PhotoPicker.


The value of this intent-extra should be a
`https://developer.android.com/reference/android/widget/photopicker/PhotoPickerUiCustomizationParams` object. The extra can
only be specified in `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`.


Not passing this EXTRA, means the photo picker will use its default UI (e.g. rendering the
media items grid in 1:1 aspect ratio).


To use this key, calling apps should construct a
`https://developer.android.com/reference/android/widget/photopicker/PhotoPickerUiCustomizationParams` object using its
`https://developer.android.com/reference/android/widget/photopicker/PhotoPickerUiCustomizationParams.Builder` and pass it as
the value.  

Example: If the calling app wants to allow the Photo Picker to use a 9:16 aspect ratio
for the thumbnails:

```
 PhotoPickerUiCustomizationParams params = new PhotoPickerUiCustomizationParams.Builder()
     .setAspectRatio(PhotoPickerUiCustomizationParams.ASPECT_RATIO_PORTRAIT_9_16)
     .build();
 Intent intent = new Intent(MediaStore.ACTION_PICK_IMAGES);
 intent.putExtra(MediaStore.EXTRA_PICK_IMAGES_UI_CUSTOMIZATION_PARAMS, params);
 
```

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/widget/photopicker/PhotoPickerUiCustomizationParams`

Constant Value:

"android.provider.extra.PICK_IMAGES_UI_CUSTOMIZATION_PARAMS"


### EXTRA_REQUEST_LOCATION_METADATA_ACCESS

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final String EXTRA_REQUEST_LOCATION_METADATA_ACCESS
```

The name of an optional intent-extra used to allow apps to request access to the location
metadata of the media items selected by the user and returned by
`https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`.


This is a boolean intent extra which when set to `true` informs the photopicker that
the app is requesting location information for the media items selected by the user.
The default value for this extra will always be `false` i.e. not sharing the
location metadata of the selected media items with the calling app.


**For `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`:**
This extra is always required to request location metadata. If excluded, location metadata
is redacted by default.


**Note on User Choice:**
For `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`, using this intent extra does not guarantee that
the calling app will get the location information. The photopicker reserves the right to
inform the user of this request via the UI. The user's choice to allow or deny location
sharing in the picker UI is **final**.


If location access is ultimately granted, calling apps can extract this metadata when the
selected media files are opened using the returned picker URIs.

<br />

Constant Value:

"android.provider.extra.REQUEST_LOCATION_METADATA_ACCESS"


### EXTRA_SCREEN_ORIENTATION

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

```
public static final String EXTRA_SCREEN_ORIENTATION
```

The name of the Intent-extra used to control the orientation of a ViewImage or a MovieView.
This is an int property that overrides the activity's requestedOrientation.

<br />

**See also:**

- `https://developer.android.com/reference/android/content/pm/ActivityInfo#SCREEN_ORIENTATION_UNSPECIFIED`

Constant Value:

"android.intent.extra.screenOrientation"


### EXTRA_SHOW_ACTION_ICONS

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

```
public static final String EXTRA_SHOW_ACTION_ICONS
```

The name of an Intent-extra used to control the UI of a ViewImage.
This is a boolean property that specifies whether or not to show action icons.

<br />

Constant Value:

"android.intent.extra.showActionIcons"


### EXTRA_SIZE_LIMIT

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

```
public static final String EXTRA_SIZE_LIMIT
```

Specify the maximum allowed size.

<br />

Constant Value:

"android.intent.extra.sizeLimit"


### EXTRA_VIDEO_QUALITY

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

```
public static final String EXTRA_VIDEO_QUALITY
```

The name of the Intent-extra used to control the quality of a recorded video. This is an
integer property. Currently value 0 means low quality, suitable for MMS messages, and
value 1 means high quality. In the future other quality levels may be added.

<br />

Constant Value:

"android.intent.extra.videoQuality"


### INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH

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

```
public static final String INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH
```

An intent to perform a search for music media and automatically play content from the
result when possible. This can be fired, for example, by the result of a voice recognition
command to listen to music.

This intent always includes the `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_MEDIA_FOCUS`
and `https://developer.android.com/reference/android/app/SearchManager#QUERY` extras. The
`https://developer.android.com/reference/android/provider/MediaStore#EXTRA_MEDIA_FOCUS` extra determines the search mode, and
the value of the `https://developer.android.com/reference/android/app/SearchManager#QUERY` extra depends on the search mode.
For more information about the search modes for this intent, see
[Play music based
on a search query](https://developer.android.com/guide/components/intents-common#PlaySearch) in [Common
Intents](https://developer.android.com/guide/components/intents-common).

This intent makes the most sense for apps that can support large-scale search of music,
such as services connected to an online database of music which can be streamed and played
on the device.

<br />

<br />

Constant Value:

"android.media.action.MEDIA_PLAY_FROM_SEARCH"


### INTENT_ACTION_MEDIA_SEARCH

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

```
public static final String INTENT_ACTION_MEDIA_SEARCH
```

Activity Action: Perform a search for media.
Contains at least the `https://developer.android.com/reference/android/app/SearchManager#QUERY` extra.
May also contain any combination of the following extras:
EXTRA_MEDIA_ARTIST, EXTRA_MEDIA_ALBUM, EXTRA_MEDIA_TITLE, EXTRA_MEDIA_FOCUS

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_MEDIA_ARTIST`
- `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_MEDIA_ALBUM`
- `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_MEDIA_TITLE`
- `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_MEDIA_FOCUS`

Constant Value:

"android.intent.action.MEDIA_SEARCH"


### INTENT_ACTION_MUSIC_PLAYER

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

```
public static final String INTENT_ACTION_MUSIC_PLAYER
```


**This constant was deprecated
in API level 15.**   

Use `https://developer.android.com/reference/android/content/Intent#CATEGORY_APP_MUSIC` instead.

Activity Action: Launch a music player.
The activity should be able to play, browse, or manipulate music files stored on the device.

<br />

Constant Value:

"android.intent.action.MUSIC_PLAYER"


### INTENT_ACTION_STILL_IMAGE_CAMERA

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

```
public static final String INTENT_ACTION_STILL_IMAGE_CAMERA
```

The name of the Intent action used to launch a camera in still image mode.

<br />

Constant Value:

"android.media.action.STILL_IMAGE_CAMERA"


### INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE

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

```
public static final String INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE
```

The name of the Intent action used to launch a camera in still image mode
for use when the device is secured (e.g. with a pin, password, pattern,
or face unlock). Applications responding to this intent must not expose
any personal content like existing photos or videos on the device. The
applications should be careful not to share any photo or video with other
applications or internet. The activity should use `https://developer.android.com/reference/android/app/Activity#setShowWhenLocked(boolean)` to display
on top of the lock screen while secured. There is no activity stack when
this flag is used, so launching more than one activity is strongly
discouraged.

<br />

Constant Value:

"android.media.action.STILL_IMAGE_CAMERA_SECURE"


### INTENT_ACTION_TEXT_OPEN_FROM_SEARCH

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

```
public static final String INTENT_ACTION_TEXT_OPEN_FROM_SEARCH
```

An intent to perform a search for readable media and automatically play content from the
result when possible. This can be fired, for example, by the result of a voice recognition
command to read a book or magazine.


Contains the `https://developer.android.com/reference/android/app/SearchManager#QUERY` extra, which is a string that can
contain any type of unstructured text search, like the name of a book or magazine, an author
a genre, a publisher, or any combination of these.


Because this intent includes an open-ended unstructured search string, it makes the most
sense for apps that can support large-scale search of text media, such as services connected
to an online database of books and/or magazines which can be read on the device.

<br />

Constant Value:

"android.media.action.TEXT_OPEN_FROM_SEARCH"


### INTENT_ACTION_VIDEO_CAMERA

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

```
public static final String INTENT_ACTION_VIDEO_CAMERA
```

The name of the Intent action used to launch a camera in video mode.

<br />

Constant Value:

"android.media.action.VIDEO_CAMERA"


### INTENT_ACTION_VIDEO_PLAY_FROM_SEARCH

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

```
public static final String INTENT_ACTION_VIDEO_PLAY_FROM_SEARCH
```

An intent to perform a search for video media and automatically play content from the
result when possible. This can be fired, for example, by the result of a voice recognition
command to play movies.


Contains the `https://developer.android.com/reference/android/app/SearchManager#QUERY` extra, which is a string that can
contain any type of unstructured video search, like the name of a movie, one or more actors,
a genre, or any combination of these.


Because this intent includes an open-ended unstructured search string, it makes the most
sense for apps that can support large-scale search of video, such as services connected to an
online database of videos which can be streamed and played on the device.

<br />

Constant Value:

"android.media.action.VIDEO_PLAY_FROM_SEARCH"


### KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final String KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID
```

One of the `https://developer.android.com/reference/android/os/Bundle` keys for
`https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_ALBUM` specifying the photopicker album for
which the app can request to show highlighted media results in the photopicker.
The value of this key should be one of
`https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_ALBUM_FAVORITES`,
`https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_ALBUM_CAMERA`,
`https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_ALBUM_VIDEOS`,
`https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_ALBUM_SCREENSHOTS` or
`https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_ALBUM_DOWNLOADS`.
Any other value for this key will result in throwing `IllegalArgumentException`.
See: `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_ALBUM`

<br />

Constant Value:

"android.provider.media.key.PICK_IMAGES_HIGHLIGHT_MEDIA_ALBUM_ID"


### KEY_PICK_IMAGES_HIGHLIGHT_SEARCH_TEXT_QUERY

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final String KEY_PICK_IMAGES_HIGHLIGHT_SEARCH_TEXT_QUERY
```

One of the `https://developer.android.com/reference/android/os/Bundle` keys for
`https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_SEARCH_RESULTS` specifying the input query for
which the app can request to show highlighted media results in the photopicker.
The photopicker will trigger a search based on this input value to show
highlighted media results.
The value of this key can be any string value for which the app wants to show highlighted
results.
In case the input text query is null, `IllegalArgumentException` is thrown.
Read more: `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_SEARCH_RESULTS`

<br />

Constant Value:

"android.provider.media.key.PICK_IMAGES_HIGHLIGHT_SEARCH_TEXT_QUERY"


### KEY_PICK_IMAGES_HIGHLIGHT_TYPE

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [T Extensions 19](https://developer.android.com/sdkExtensions)

```
public static final String KEY_PICK_IMAGES_HIGHLIGHT_TYPE
```

One of the `https://developer.android.com/reference/android/os/Bundle` keys for
`https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_SEARCH_RESULTS` and
`https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_ALBUM` to specify the highlight type
i.e. the way the highlighted media results will be shown in the photopicker.
The value can be one of `https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_TYPE_COLLAPSED` to show a
highlight media section in the photopicker or
`https://developer.android.com/reference/android/provider/MediaStore#PICK_IMAGES_HIGHLIGHT_TYPE_EXPANDED` to show a highlighted media
results grid.
Any other value for this key will result in throwing `IllegalArgumentException`.
Read more: `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_SEARCH_RESULTS`

<br />

Constant Value:

"android.provider.media.key.PICK_IMAGES_HIGHLIGHT_TYPE"


### MATCH_DEFAULT

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

```
public static final int MATCH_DEFAULT
```

Value indicating that the default matching behavior should be used, as
defined by the key documentation.

<br />

Constant Value:

0
(0x00000000)


### MATCH_EXCLUDE

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

```
public static final int MATCH_EXCLUDE
```

Value indicating that operations should exclude items matching the
criteria defined by this key.

<br />

Constant Value:

2
(0x00000002)


### MATCH_INCLUDE

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

```
public static final int MATCH_INCLUDE
```

Value indicating that operations should include items matching the
criteria defined by this key.


Note that items *not* matching the criteria *may* also be
included depending on the default behavior documented by the key. If you
want to operate exclusively on matching items, use `https://developer.android.com/reference/android/provider/MediaStore#MATCH_ONLY`.

<br />

Constant Value:

1
(0x00000001)


### MATCH_ONLY

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

```
public static final int MATCH_ONLY
```

Value indicating that operations should only operate on items explicitly
matching the criteria defined by this key.

<br />

Constant Value:

3
(0x00000003)


### MEDIA_IGNORE_FILENAME

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

```
public static final String MEDIA_IGNORE_FILENAME
```

Name of the file signaling the media scanner to ignore media in the containing directory
and its subdirectories. Developers should use this to avoid application graphics showing
up in the Gallery and likewise prevent application sounds and music from showing up in
the Music app.

<br />

Constant Value:

".nomedia"


### MEDIA_SCANNER_VOLUME

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

```
public static final String MEDIA_SCANNER_VOLUME
```

Name of current volume being scanned by the media scanner.

<br />

Constant Value:

"volume"


### META_DATA_REVIEW_GALLERY_PREWARM_SERVICE

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

```
public static final String META_DATA_REVIEW_GALLERY_PREWARM_SERVICE
```

Name under which an activity handling `https://developer.android.com/reference/android/provider/MediaStore#ACTION_REVIEW` or
`https://developer.android.com/reference/android/provider/MediaStore#ACTION_REVIEW_SECURE` publishes the service name for its prewarm
service.


This meta-data should reference the fully qualified class name of the prewarm service


The prewarm service can be bound before starting `https://developer.android.com/reference/android/provider/MediaStore#ACTION_REVIEW` or
`https://developer.android.com/reference/android/provider/MediaStore#ACTION_REVIEW_SECURE`.
An application implementing this prewarm service should do the absolute minimum amount of
work to initialize its resources to efficiently handle an `https://developer.android.com/reference/android/provider/MediaStore#ACTION_REVIEW` or
`https://developer.android.com/reference/android/provider/MediaStore#ACTION_REVIEW_SECURE` in the near future.

<br />

Constant Value:

"android.media.review_gallery_prewarm_service"


### META_DATA_STILL_IMAGE_CAMERA_PREWARM_SERVICE

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

```
public static final String META_DATA_STILL_IMAGE_CAMERA_PREWARM_SERVICE
```

Name under which an activity handling `https://developer.android.com/reference/android/provider/MediaStore#INTENT_ACTION_STILL_IMAGE_CAMERA` or
`https://developer.android.com/reference/android/provider/MediaStore#INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE` publishes the service name for its prewarm
service.


This meta-data should reference the fully qualified class name of the prewarm service
extending `CameraPrewarmService`.


The prewarm service will get bound and receive a prewarm signal
`CameraPrewarmService#onPrewarm()` when a camera launch intent fire might be imminent.
An application implementing a prewarm service should do the absolute minimum amount of work
to initialize the camera in order to reduce startup time in likely case that shortly after a
camera launch intent would be sent.

<br />

Constant Value:

"android.media.still_image_camera_preview_service"


### PICK_IMAGES_HIGHLIGHT_ALBUM_CAMERA

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [T Extensions 19](https://developer.android.com/sdkExtensions)

```
public static final String PICK_IMAGES_HIGHLIGHT_ALBUM_CAMERA
```

One of the possible album highlight values for
`https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID` in case
an app chooses to highlight media results from an album, in this case, the
Camera album.
Read more: `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_ALBUM`

<br />

Constant Value:

"android.provider.media.PICK_IMAGES_HIGHLIGHT_ALBUM_CAMERA"


### PICK_IMAGES_HIGHLIGHT_ALBUM_DOWNLOADS

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [T Extensions 19](https://developer.android.com/sdkExtensions)

```
public static final String PICK_IMAGES_HIGHLIGHT_ALBUM_DOWNLOADS
```

One of the possible album highlight values for
`https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID` in case
an app chooses to highlight media results from an album, in this case, the
Downloads album.
Read more: `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_ALBUM`

<br />

Constant Value:

"android.provider.media.PICK_IMAGES_HIGHLIGHT_ALBUM_DOWNLOADS"


### PICK_IMAGES_HIGHLIGHT_ALBUM_FAVORITES

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [T Extensions 19](https://developer.android.com/sdkExtensions)

```
public static final String PICK_IMAGES_HIGHLIGHT_ALBUM_FAVORITES
```

One of the possible album highlight values for
`https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID`
in case an app chooses to highlight media results from an album, in this case, the
Favorites album.
Read more: `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_ALBUM`

<br />

Constant Value:

"android.provider.media.PICK_IMAGES_HIGHLIGHT_ALBUM_FAVORITES"


### PICK_IMAGES_HIGHLIGHT_ALBUM_SCREENSHOTS

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [T Extensions 19](https://developer.android.com/sdkExtensions)

```
public static final String PICK_IMAGES_HIGHLIGHT_ALBUM_SCREENSHOTS
```

One of the possible album highlight values for
`https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID`
in case an app chooses to highlight media results from from an album, in this case, the
Screenshots album.
Read more: `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_ALBUM`

<br />

Constant Value:

"android.provider.media.PICK_IMAGES_HIGHLIGHT_ALBUM_SCREENSHOTS"


### PICK_IMAGES_HIGHLIGHT_ALBUM_VIDEOS

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [T Extensions 19](https://developer.android.com/sdkExtensions)

```
public static final String PICK_IMAGES_HIGHLIGHT_ALBUM_VIDEOS
```

One of the possible album highlight values for
`https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID` in case
an app chooses to highlight media results from an album, in this case, the
Videos album.
Read more: `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_ALBUM`

<br />

Constant Value:

"android.provider.media.PICK_IMAGES_HIGHLIGHT_ALBUM_VIDEOS"


### PICK_IMAGES_HIGHLIGHT_TYPE_COLLAPSED

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [T Extensions 19](https://developer.android.com/sdkExtensions)

```
public static final int PICK_IMAGES_HIGHLIGHT_TYPE_COLLAPSED
```

One of the permitted values for
`https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_TYPE`
to highlight media results as a highlighted media section in the photopicker based on the
given input query in `https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_SEARCH_TEXT_QUERY` or the
given input photopicker album in MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID}.
Read more: `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_SEARCH_RESULTS` and
`https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_ALBUM`

<br />

Constant Value:

0
(0x00000000)


### PICK_IMAGES_HIGHLIGHT_TYPE_EXPANDED

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [T Extensions 19](https://developer.android.com/sdkExtensions)

```
public static final int PICK_IMAGES_HIGHLIGHT_TYPE_EXPANDED
```

One of the permitted values for
`https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_TYPE`
to show a highlighted media results grid based on the given input query in
`https://developer.android.com/reference/android/provider/MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_SEARCH_TEXT_QUERY` or the given input
photopicker album in MediaStore#KEY_PICK_IMAGES_HIGHLIGHT_ALBUM_ID}.
Read more: `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_SEARCH_RESULTS` and
`https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_HIGHLIGHT_ALBUM`

<br />

Constant Value:

1
(0x00000001)


### PICK_IMAGES_TAB_ALBUMS

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

```
public static final int PICK_IMAGES_TAB_ALBUMS
```

One of the permitted values for `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_LAUNCH_TAB` to open the
picker with albums tab.

<br />

Constant Value:

0
(0x00000000)


### PICK_IMAGES_TAB_IMAGES

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

```
public static final int PICK_IMAGES_TAB_IMAGES
```

One of the permitted values for `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_LAUNCH_TAB` to open the
picker with photos tab.

<br />

Constant Value:

1
(0x00000001)


### QUERY_ARG_INCLUDE_RECENTLY_UNMOUNTED_VOLUMES

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

```
public static final String QUERY_ARG_INCLUDE_RECENTLY_UNMOUNTED_VOLUMES
```

Flag that requests `https://developer.android.com/reference/android/content/ContentResolver#query(android.net.Uri,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)` to include content from
recently unmounted volumes.


When the flag is set, `https://developer.android.com/reference/android/content/ContentResolver#query(android.net.Uri,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)` will return content
from all volumes(i.e., both mounted and recently unmounted volume whose
content is still held by MediaProvider).


Note that the query result doesn't provide any hint for content from
unmounted volume. It's strongly recommended to use default query to
avoid accessing/operating on the content that are not available on the
device.


The flag is useful for apps which manage their own database and
query MediaStore in order to synchronize between MediaStore database
and their own database.

<br />

Constant Value:

"android:query-arg-recently-unmounted-volumes"


### QUERY_ARG_LATEST_SELECTION_ONLY

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 12](https://developer.android.com/sdkExtensions)

```
public static final String QUERY_ARG_LATEST_SELECTION_ONLY
```

Flag that indicates if only the latest selection in the photoPicker for
the calling app should be returned. If set to true, all items that were
granted to the calling app in the last selection are returned.

Selection in this scenario refers to when the user selects items in
**the permission prompt photo picker**. The access for these items
is granted to the calling app and these grants are persisted unless the
user deselects a granted item explicitly.

The result excludes items owned by the calling app unless they are
explicitly selected by the user.

Note: If there has been no user selections after the introduction of
this feature then all the granted items will be returned.

This key can be placed in a `https://developer.android.com/reference/android/os/Bundle` of extras and passed to
`https://developer.android.com/reference/android/content/ContentResolver#query(android.net.Uri,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)`.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/Manifest.permission#READ_MEDIA_VISUAL_USER_SELECTED`

Constant Value:

"android:query-arg-latest-selection-only"


### QUERY_ARG_MATCH_FAVORITE

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

```
public static final String QUERY_ARG_MATCH_FAVORITE
```

Specify how `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#IS_FAVORITE` items should be filtered
when performing a `https://developer.android.com/reference/android/provider/MediaStore` operation.


This key can be placed in a `https://developer.android.com/reference/android/os/Bundle` of extras and passed to
`https://developer.android.com/reference/android/content/ContentResolver#query(android.net.Uri,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)`, `https://developer.android.com/reference/android/content/ContentResolver#update(android.net.Uri,%20android.content.ContentValues,%20android.os.Bundle)`, or
`https://developer.android.com/reference/android/content/ContentResolver#delete(android.net.Uri,%20android.os.Bundle)`.


By default, favorite items are *not* filtered away from
operations.


Value is either `0` or a combination of the following:

- `https://developer.android.com/reference/android/provider/MediaStore#MATCH_DEFAULT`
- `https://developer.android.com/reference/android/provider/MediaStore#MATCH_INCLUDE`
- `https://developer.android.com/reference/android/provider/MediaStore#MATCH_EXCLUDE`
- `https://developer.android.com/reference/android/provider/MediaStore#MATCH_ONLY`
**See also:**

  - `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#IS_FAVORITE`
  - `https://developer.android.com/reference/android/provider/MediaStore#QUERY_ARG_MATCH_FAVORITE`
  - `https://developer.android.com/reference/android/provider/MediaStore#createFavoriteRequest(android.content.ContentResolver,%20java.util.Collection<android.net.Uri>,%20boolean)`
  - Constant Value: "android:query-arg-match-favorite"

### QUERY_ARG_MATCH_PENDING

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

```
public static final String QUERY_ARG_MATCH_PENDING
```

Specify how `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#IS_PENDING` items should be filtered when
performing a `https://developer.android.com/reference/android/provider/MediaStore` operation.


This key can be placed in a `https://developer.android.com/reference/android/os/Bundle` of extras and passed to
`https://developer.android.com/reference/android/content/ContentResolver#query(android.net.Uri,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)`, `https://developer.android.com/reference/android/content/ContentResolver#update(android.net.Uri,%20android.content.ContentValues,%20android.os.Bundle)`, or
`https://developer.android.com/reference/android/content/ContentResolver#delete(android.net.Uri,%20android.os.Bundle)`.


By default, pending items are filtered away from operations.


Value is either `0` or a combination of the following:

- `https://developer.android.com/reference/android/provider/MediaStore#MATCH_DEFAULT`
- `https://developer.android.com/reference/android/provider/MediaStore#MATCH_INCLUDE`
- `https://developer.android.com/reference/android/provider/MediaStore#MATCH_EXCLUDE`
- `https://developer.android.com/reference/android/provider/MediaStore#MATCH_ONLY`
  - Constant Value: "android:query-arg-match-pending"

### QUERY_ARG_MATCH_TRASHED

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

```
public static final String QUERY_ARG_MATCH_TRASHED
```

Specify how `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#IS_TRASHED` items should be filtered when
performing a `https://developer.android.com/reference/android/provider/MediaStore` operation.


This key can be placed in a `https://developer.android.com/reference/android/os/Bundle` of extras and passed to
`https://developer.android.com/reference/android/content/ContentResolver#query(android.net.Uri,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)`, `https://developer.android.com/reference/android/content/ContentResolver#update(android.net.Uri,%20android.content.ContentValues,%20android.os.Bundle)`, or
`https://developer.android.com/reference/android/content/ContentResolver#delete(android.net.Uri,%20android.os.Bundle)`.


By default, trashed items are filtered away from operations.


Value is either `0` or a combination of the following:

- `https://developer.android.com/reference/android/provider/MediaStore#MATCH_DEFAULT`
- `https://developer.android.com/reference/android/provider/MediaStore#MATCH_INCLUDE`
- `https://developer.android.com/reference/android/provider/MediaStore#MATCH_EXCLUDE`
- `https://developer.android.com/reference/android/provider/MediaStore#MATCH_ONLY`
**See also:**

  - `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#IS_TRASHED`
  - `https://developer.android.com/reference/android/provider/MediaStore#QUERY_ARG_MATCH_TRASHED`
  - `https://developer.android.com/reference/android/provider/MediaStore#createTrashRequest(android.content.ContentResolver,%20java.util.Collection<android.net.Uri>,%20boolean)`
  - Constant Value: "android:query-arg-match-trashed"

### QUERY_ARG_MEDIA_STANDARD_SORT_ORDER

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [R Extensions 15](https://developer.android.com/sdkExtensions)

```
public static final String QUERY_ARG_MEDIA_STANDARD_SORT_ORDER
```

Flag that requests `https://developer.android.com/reference/android/content/ContentResolver#query(android.net.Uri,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)` to sort the result in descending order
based on `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#INFERRED_DATE`.


When this flag is used as an extra in a `https://developer.android.com/reference/android/os/Bundle` passed to
`https://developer.android.com/reference/android/content/ContentResolver#query(android.net.Uri,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)`, all other sorting options such as
`https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_SORT_COLUMNS` or
`https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_SQL_SORT_ORDER` are disregarded.

<br />

Constant Value:

"android:query-arg-media-standard-sort-order"


### QUERY_ARG_RELATED_URI

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

```
public static final String QUERY_ARG_RELATED_URI
```

Specify a `https://developer.android.com/reference/android/net/Uri` that is "related" to the current operation being
performed.


This is typically used to allow an operation that may normally be
rejected, such as making a copy of a pre-existing image located under a
`https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#RELATIVE_PATH` where new images are not allowed.


It's strongly recommended that when making a copy of pre-existing content
that you define the "original document ID" GUID as defined by the *XMP
Media Management* standard.


This key can be placed in a `https://developer.android.com/reference/android/os/Bundle` of extras and passed to
`https://developer.android.com/reference/android/content/ContentResolver#insert(android.net.Uri,%20android.content.ContentValues)`.

<br />

Constant Value:

"android:query-arg-related-uri"


### UNKNOWN_STRING

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

```
public static final String UNKNOWN_STRING
```

The string that is used when a media attribute is not known. For example,
if an audio file does not have any meta data, the artist and album columns
will be set to this value.

<br />

Constant Value:

""

### VOLUME_EXTERNAL

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

```
public static final String VOLUME_EXTERNAL
```

Synthetic volume name that provides a view of all content across the
"external" storage of the device.


This synthetic volume provides a merged view of all media across all
currently attached external storage devices.


Because this is a synthetic volume, you can't insert new content into
this volume. Instead, you can insert content into a specific storage
volume obtained from `https://developer.android.com/reference/android/provider/MediaStore#getExternalVolumeNames(android.content.Context)`.

<br />

Constant Value:

"external"


### VOLUME_EXTERNAL_PRIMARY

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

```
public static final String VOLUME_EXTERNAL_PRIMARY
```

Specific volume name that represents the primary external storage device
at `https://developer.android.com/reference/android/os/Environment#getExternalStorageDirectory()`.


This volume may not always be available, such as when the user has
ejected the device. You can find a list of all specific volume names
using `https://developer.android.com/reference/android/provider/MediaStore#getExternalVolumeNames(android.content.Context)`.

<br />

Constant Value:

"external_primary"


### VOLUME_INTERNAL

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

```
public static final String VOLUME_INTERNAL
```

Synthetic volume name that provides a view of all content across the
"internal" storage of the device.


This synthetic volume provides a merged view of all media distributed
with the device, such as built-in ringtones and wallpapers.


Because this is a synthetic volume, you can't insert new content into
this volume.

<br />

Constant Value:

"internal"


## Fields

### AUTHORITY_URI

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

```
public static final Uri AUTHORITY_URI
```

A content:// style uri to the authority for the media provider

<br />

## Public constructors

### MediaStore

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

```
public MediaStore ()
```

<br />

<br />

## Public methods

### canManageMedia

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

```
public static boolean canManageMedia (Context context)
```

Returns whether the calling app is granted `https://developer.android.com/reference/android/Manifest.permission#MANAGE_MEDIA`
or not.

Declaring the permission `https://developer.android.com/reference/android/Manifest.permission#MANAGE_MEDIA` isn't
enough to gain the access.

To request access, use `https://developer.android.com/reference/android/provider/Settings#ACTION_REQUEST_MANAGE_MEDIA`.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: the request context. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | true, the calling app is granted the permission. Otherwise, false <br /> |

**See also:**

- `https://developer.android.com/reference/android/Manifest.permission#MANAGE_MEDIA`
- `https://developer.android.com/reference/android/provider/Settings#ACTION_REQUEST_MANAGE_MEDIA`
- `https://developer.android.com/reference/android/provider/MediaStore#createDeleteRequest(android.content.ContentResolver,%20java.util.Collection<android.net.Uri>)`
- `https://developer.android.com/reference/android/provider/MediaStore#createTrashRequest(android.content.ContentResolver,%20java.util.Collection<android.net.Uri>,%20boolean)`
- `https://developer.android.com/reference/android/provider/MediaStore#createWriteRequest(android.content.ContentResolver,%20java.util.Collection<android.net.Uri>)`

### createDeleteRequest

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

```
public static PendingIntent createDeleteRequest (ContentResolver resolver, 
                Collection<Uri> uris)
```

Create a `https://developer.android.com/reference/android/app/PendingIntent` that will prompt the user to permanently
delete the requested media items. When the user approves this request,
`https://developer.android.com/reference/android/content/ContentResolver#delete(android.net.Uri,%20android.os.Bundle)` will be called on these items.


This call only generates the request for a prompt; to display the prompt,
call `https://developer.android.com/reference/android/app/Activity#startIntentSenderForResult(android.content.IntentSender,%20int,%20android.content.Intent,%20int,%20int,%20int)` with
`https://developer.android.com/reference/android/app/PendingIntent#getIntentSender()`. You can then determine if the
user granted your request by testing for `https://developer.android.com/reference/android/app/Activity#RESULT_OK` in
`https://developer.android.com/reference/android/app/Activity#onActivityResult(int,%20int,%20android.content.Intent)`. The requested operation will have
completely finished before this activity result is delivered.


The displayed prompt will reflect all the media items you're requesting,
including those for which you already hold write access. If you want to
determine if you already hold write access before requesting access, use
`https://developer.android.com/reference/android/content/Context#checkUriPermission(android.net.Uri,%20int,%20int,%20int)` with
`https://developer.android.com/reference/android/content/Intent#FLAG_GRANT_WRITE_URI_PERMISSION`.


Note: if your app targets `https://developer.android.com/reference/android/os/Build.VERSION_CODES#BAKLAVA`
and above, you can send a maximum of 2000 uris in each request.
Attempting to send more than 2000 uris will result in a
`https://developer.android.com/reference/java/lang/IllegalArgumentException`.

<br />

| Parameters ||
|---|---|
| `resolver` | `ContentResolver`: Used to connect with `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY`. Typically this value is `https://developer.android.com/reference/android/content/Context#getContentResolver()`, but if you need more explicit lifecycle controls, you can obtain a `https://developer.android.com/reference/android/content/ContentProviderClient` and wrap it using `https://developer.android.com/reference/android/content/ContentResolver#wrap(android.content.ContentProviderClient)`. This value cannot be `null`. <br /> |
| `uris` | `Collection`: The set of media items to include in this request. Each item must be hosted by `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY` and must reference a specific media item by `https://developer.android.com/reference/android/provider/BaseColumns#_ID`. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/PendingIntent` | This value cannot be `null`. <br /> |

### createFavoriteRequest

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

```
public static PendingIntent createFavoriteRequest (ContentResolver resolver, 
                Collection<Uri> uris, 
                boolean value)
```

Create a `https://developer.android.com/reference/android/app/PendingIntent` that will prompt the user to favorite the
requested media items. When the user approves this request,
`https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#IS_FAVORITE` is set on these items.


This call only generates the request for a prompt; to display the prompt,
call `https://developer.android.com/reference/android/app/Activity#startIntentSenderForResult(android.content.IntentSender,%20int,%20android.content.Intent,%20int,%20int,%20int)` with
`https://developer.android.com/reference/android/app/PendingIntent#getIntentSender()`. You can then determine if the
user granted your request by testing for `https://developer.android.com/reference/android/app/Activity#RESULT_OK` in
`https://developer.android.com/reference/android/app/Activity#onActivityResult(int,%20int,%20android.content.Intent)`. The requested operation will have
completely finished before this activity result is delivered.


The displayed prompt will reflect all the media items you're requesting,
including those for which you already hold write access. If you want to
determine if you already hold write access before requesting access, use
`https://developer.android.com/reference/android/content/Context#checkUriPermission(android.net.Uri,%20int,%20int,%20int)` with
`https://developer.android.com/reference/android/content/Intent#FLAG_GRANT_WRITE_URI_PERMISSION`.


Note: if your app targets `https://developer.android.com/reference/android/os/Build.VERSION_CODES#BAKLAVA`
and above, you can send a maximum of 2000 uris in each request.
Attempting to send more than 2000 uris will result in a
`https://developer.android.com/reference/java/lang/IllegalArgumentException`.

<br />

| Parameters ||
|---|---|
| `resolver` | `ContentResolver`: Used to connect with `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY`. Typically this value is `https://developer.android.com/reference/android/content/Context#getContentResolver()`, but if you need more explicit lifecycle controls, you can obtain a `https://developer.android.com/reference/android/content/ContentProviderClient` and wrap it using `https://developer.android.com/reference/android/content/ContentResolver#wrap(android.content.ContentProviderClient)`. This value cannot be `null`. <br /> |
| `uris` | `Collection`: The set of media items to include in this request. Each item must be hosted by `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY` and must reference a specific media item by `https://developer.android.com/reference/android/provider/BaseColumns#_ID`. This value cannot be `null`. <br /> |
| `value` | `boolean`: The `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#IS_FAVORITE` value to apply. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/PendingIntent` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#IS_FAVORITE`
- `https://developer.android.com/reference/android/provider/MediaStore#QUERY_ARG_MATCH_FAVORITE`

### createTrashRequest

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

```
public static PendingIntent createTrashRequest (ContentResolver resolver, 
                Collection<Uri> uris, 
                boolean value)
```

Create a `https://developer.android.com/reference/android/app/PendingIntent` that will prompt the user to trash the
requested media items. When the user approves this request,
`https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#IS_TRASHED` is set on these items.


This call only generates the request for a prompt; to display the prompt,
call `https://developer.android.com/reference/android/app/Activity#startIntentSenderForResult(android.content.IntentSender,%20int,%20android.content.Intent,%20int,%20int,%20int)` with
`https://developer.android.com/reference/android/app/PendingIntent#getIntentSender()`. You can then determine if the
user granted your request by testing for `https://developer.android.com/reference/android/app/Activity#RESULT_OK` in
`https://developer.android.com/reference/android/app/Activity#onActivityResult(int,%20int,%20android.content.Intent)`. The requested operation will have
completely finished before this activity result is delivered.


The displayed prompt will reflect all the media items you're requesting,
including those for which you already hold write access. If you want to
determine if you already hold write access before requesting access, use
`https://developer.android.com/reference/android/content/Context#checkUriPermission(android.net.Uri,%20int,%20int,%20int)` with
`https://developer.android.com/reference/android/content/Intent#FLAG_GRANT_WRITE_URI_PERMISSION`.


Note: if your app targets `https://developer.android.com/reference/android/os/Build.VERSION_CODES#BAKLAVA`
and above, you can send a maximum of 2000 uris in each request.
Attempting to send more than 2000 uris will result in a
`https://developer.android.com/reference/java/lang/IllegalArgumentException`.

<br />

| Parameters ||
|---|---|
| `resolver` | `ContentResolver`: Used to connect with `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY`. Typically this value is `https://developer.android.com/reference/android/content/Context#getContentResolver()`, but if you need more explicit lifecycle controls, you can obtain a `https://developer.android.com/reference/android/content/ContentProviderClient` and wrap it using `https://developer.android.com/reference/android/content/ContentResolver#wrap(android.content.ContentProviderClient)`. This value cannot be `null`. <br /> |
| `uris` | `Collection`: The set of media items to include in this request. Each item must be hosted by `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY` and must reference a specific media item by `https://developer.android.com/reference/android/provider/BaseColumns#_ID`. This value cannot be `null`. <br /> |
| `value` | `boolean`: The `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#IS_TRASHED` value to apply. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/PendingIntent` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#IS_TRASHED`
- `https://developer.android.com/reference/android/provider/MediaStore#QUERY_ARG_MATCH_TRASHED`

### createWriteRequest

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

```
public static PendingIntent createWriteRequest (ContentResolver resolver, 
                Collection<Uri> uris)
```

Create a `https://developer.android.com/reference/android/app/PendingIntent` that will prompt the user to grant your
app write access for the requested media items.


This call only generates the request for a prompt; to display the prompt,
call `https://developer.android.com/reference/android/app/Activity#startIntentSenderForResult(android.content.IntentSender,%20int,%20android.content.Intent,%20int,%20int,%20int)` with
`https://developer.android.com/reference/android/app/PendingIntent#getIntentSender()`. You can then determine if the
user granted your request by testing for `https://developer.android.com/reference/android/app/Activity#RESULT_OK` in
`https://developer.android.com/reference/android/app/Activity#onActivityResult(int,%20int,%20android.content.Intent)`. The requested operation will have
completely finished before this activity result is delivered.


Permissions granted through this mechanism are tied to the lifecycle of
the `https://developer.android.com/reference/android/app/Activity` that requests them. If you need to retain
longer-term access for background actions, you can place items into a
`https://developer.android.com/reference/android/content/ClipData` or `https://developer.android.com/reference/android/content/Intent` which can then be passed to
`https://developer.android.com/reference/android/content/Context#startService(android.content.Intent)` or
`https://developer.android.com/reference/android/app/job/JobInfo.Builder#setClipData(android.content.ClipData,%20int)`. Be sure to include
any relevant access modes you want to retain, such as
`https://developer.android.com/reference/android/content/Intent#FLAG_GRANT_WRITE_URI_PERMISSION`.


The displayed prompt will reflect all the media items you're requesting,
including those for which you already hold write access. If you want to
determine if you already hold write access before requesting access, use
`https://developer.android.com/reference/android/content/Context#checkUriPermission(android.net.Uri,%20int,%20int,%20int)` with
`https://developer.android.com/reference/android/content/Intent#FLAG_GRANT_WRITE_URI_PERMISSION`.


For security and performance reasons this method does not support
`https://developer.android.com/reference/android/content/Intent#FLAG_GRANT_PERSISTABLE_URI_PERMISSION` or
`https://developer.android.com/reference/android/content/Intent#FLAG_GRANT_PREFIX_URI_PERMISSION`.


The write access granted through this request is general-purpose, and
once obtained you can directly `https://developer.android.com/reference/android/content/ContentResolver#update(android.net.Uri,%20android.content.ContentValues,%20android.os.Bundle)` columns
like `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#IS_FAVORITE`, `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#IS_TRASHED`,
or `https://developer.android.com/reference/android/content/ContentResolver#delete(android.net.Uri,%20android.os.Bundle)`.


Note: if your app targets `https://developer.android.com/reference/android/os/Build.VERSION_CODES#BAKLAVA`
and above, you can send a maximum of 2000 uris in each request.
Attempting to send more than 2000 uris will result in a
`https://developer.android.com/reference/java/lang/IllegalArgumentException`.

<br />

| Parameters ||
|---|---|
| `resolver` | `ContentResolver`: Used to connect with `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY`. Typically this value is `https://developer.android.com/reference/android/content/Context#getContentResolver()`, but if you need more explicit lifecycle controls, you can obtain a `https://developer.android.com/reference/android/content/ContentProviderClient` and wrap it using `https://developer.android.com/reference/android/content/ContentResolver#wrap(android.content.ContentProviderClient)`. This value cannot be `null`. <br /> |
| `uris` | `Collection`: The set of media items to include in this request. Each item must be hosted by `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY` and must reference a specific media item by `https://developer.android.com/reference/android/provider/BaseColumns#_ID`. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/PendingIntent` | This value cannot be `null`. <br /> |

### getDocumentUri

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

```
public static Uri getDocumentUri (Context context, 
                Uri mediaUri)
```

Return a `https://developer.android.com/reference/android/provider/DocumentsProvider` Uri that is an equivalent to the given
`https://developer.android.com/reference/android/provider/MediaStore` Uri.


This allows apps with Storage Access Framework permissions to convert
between `https://developer.android.com/reference/android/provider/MediaStore` and `https://developer.android.com/reference/android/provider/DocumentsProvider` Uris that refer
to the same underlying item. Note that this method doesn't grant any new
permissions; callers must already hold permissions obtained with
`https://developer.android.com/reference/android/content/Intent#ACTION_OPEN_DOCUMENT` or related APIs.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: This value cannot be `null`. <br /> |
| `mediaUri` | `Uri`: The `https://developer.android.com/reference/android/provider/MediaStore` Uri to convert. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/Uri` | An equivalent `https://developer.android.com/reference/android/provider/DocumentsProvider` Uri. Returns `null` if no equivalent was found. <br /> |

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#getMediaUri(android.content.Context,%20android.net.Uri)`

### getExternalVolumeNames

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

```
public static Set<String> getExternalVolumeNames (Context context)
```

Return list of all specific volume names that make up
`https://developer.android.com/reference/android/provider/MediaStore#VOLUME_EXTERNAL`. This includes a unique volume name for each
shared storage device that is currently attached, which typically
includes `https://developer.android.com/reference/android/provider/MediaStore#VOLUME_EXTERNAL_PRIMARY`.


Each specific volume name can be passed to APIs like
`https://developer.android.com/reference/android/provider/MediaStore.Images.Media#getContentUri(java.lang.String)` to interact with
media on that storage device.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/String>` | This value cannot be `null`. <br /> |

### getGeneration

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

```
public static long getGeneration (Context context, 
                String volumeName)
```

Return the latest generation value for the given volume.


Generation numbers are useful for apps that are attempting to quickly
identify exactly which media items have been added or changed since a
previous point in time. Generation numbers are monotonically increasing
over time, and can be safely arithmetically compared.


Detecting media changes using generation numbers is more robust than
using `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#DATE_ADDED` or
`https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#DATE_MODIFIED`, since those values may change in
unexpected ways when apps use `https://developer.android.com/reference/java/io/File#setLastModified(long)` or when
the system clock is set incorrectly.


Note that before comparing these detailed generation values, you should
first confirm that the overall version hasn't changed by checking
`https://developer.android.com/reference/android/provider/MediaStore#getVersion(android.content.Context,%20java.lang.String)`, since that indicates when
a more radical change has occurred. If the overall version changes, you
should assume that generation numbers have been reset and perform a full
synchronization pass.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: This value cannot be `null`. <br /> |
| `volumeName` | `String`: specific volume to obtain an generation value for. Must be one of the values returned from `https://developer.android.com/reference/android/provider/MediaStore#getExternalVolumeNames(android.content.Context)`. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `long` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#GENERATION_ADDED`
- `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#GENERATION_MODIFIED`

### getMediaScannerUri

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

```
public static Uri getMediaScannerUri ()
```

Uri for querying the state of the media scanner.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/Uri` | <br /> |

### getMediaUri

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

```
public static Uri getMediaUri (Context context, 
                Uri documentUri)
```

Return a `https://developer.android.com/reference/android/provider/MediaStore` Uri that is an equivalent to the given
`https://developer.android.com/reference/android/provider/DocumentsProvider` Uri. This only supports `ExternalStorageProvider`
and `MediaDocumentsProvider` Uris.


This allows apps with Storage Access Framework permissions to convert
between `https://developer.android.com/reference/android/provider/MediaStore` and `https://developer.android.com/reference/android/provider/DocumentsProvider` Uris that refer
to the same underlying item.
Note that this method doesn't grant any new permissions, but it grants the same access to
the Media Store Uri as the caller has to the given DocumentsProvider Uri; callers must
already hold permissions for documentUri obtained with `https://developer.android.com/reference/android/content/Intent#ACTION_OPEN_DOCUMENT`
or related APIs.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: This value cannot be `null`. <br /> |
| `documentUri` | `Uri`: The `https://developer.android.com/reference/android/provider/DocumentsProvider` Uri to convert. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/Uri` | An equivalent `https://developer.android.com/reference/android/provider/MediaStore` Uri. Returns `null` if no equivalent was found. <br /> |

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#getDocumentUri(android.content.Context,%20android.net.Uri)`

### getOriginalMediaFormatFileDescriptor

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

```
public static ParcelFileDescriptor getOriginalMediaFormatFileDescriptor (Context context, 
                ParcelFileDescriptor fileDescriptor)
```

Returns `https://developer.android.com/reference/android/os/ParcelFileDescriptor` representing the original media file format for
`fileDescriptor`.

Media files may get transcoded based on an application's media capabilities requirements.
However, in various cases, when the application needs access to the original media file, or
doesn't attempt to parse the actual byte contents of media files, such as playback using
`https://developer.android.com/reference/android/media/MediaPlayer` or for off-device backup, this method can be useful.

This method is applicable only for media files managed by `https://developer.android.com/reference/android/provider/MediaStore`.

The method returns the original file descriptor with the same permission that the caller
has for the input file descriptor.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: This value cannot be `null`. <br /> |
| `fileDescriptor` | `ParcelFileDescriptor`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/ParcelFileDescriptor` | This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/IOException` | if the given `https://developer.android.com/reference/android/os/ParcelFileDescriptor` could not be converted |

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_ACCEPT_ORIGINAL_MEDIA_FORMAT`

### getPackageForSearchMediaService

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [T Extensions 22](https://developer.android.com/sdkExtensions)

```
public static String getPackageForSearchMediaService (ContentResolver resolver)
```

Gets the package name of the `https://developer.android.com/` that client apps use to connect. If
the package name is an empty string, it indicates that search service is not supported or
there are no valid implementations of the service.

<br />

| Parameters ||
|---|---|
| `resolver` | `ContentResolver`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value cannot be `null`. <br /> |

### getPickImagesMaxLimit

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [R Extensions 2](https://developer.android.com/sdkExtensions)

```
public static int getPickImagesMaxLimit ()
```

The maximum limit for the number of items that can be selected using
`https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES` when launched in multiple selection mode.
This can be used as a constant value for `https://developer.android.com/reference/android/provider/MediaStore#EXTRA_PICK_IMAGES_MAX`.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getRecentExternalVolumeNames

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

```
public static Set<String> getRecentExternalVolumeNames (Context context)
```

Return list of all recent volume names that have been part of
`https://developer.android.com/reference/android/provider/MediaStore#VOLUME_EXTERNAL`.


These volume names are not currently mounted, but they're likely to
reappear in the future, so apps are encouraged to preserve any indexed
metadata related to these volumes to optimize user experiences.


Each specific volume name can be passed to APIs like
`https://developer.android.com/reference/android/provider/MediaStore.Images.Media#getContentUri(java.lang.String)` to interact with
media on that storage device.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/String>` | This value cannot be `null`. <br /> |

### getRedactedUri

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

```
public static Uri getRedactedUri (ContentResolver resolver, 
                Uri uri)
```

Returns an EXIF redacted version of `uri` i.e. a `https://developer.android.com/reference/android/net/Uri` with metadata such as
location, GPS datestamp etc. redacted from the EXIF headers.


A redacted Uri can be used to share a file with another application wherein exposing
sensitive information in EXIF headers is not desirable.
Note:
1. Redacted uris cannot be granted write access and can neither be used to perform any kind
of write operations.
2. To get a redacted uri the caller must hold read permission to `uri`.

<br />

| Parameters ||
|---|---|
| `resolver` | `ContentResolver`: The `https://developer.android.com/reference/android/content/ContentResolver` used to connect with `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY`. Typically this value is gotten from `https://developer.android.com/reference/android/content/Context#getContentResolver()` This value cannot be `null`. <br /> |
| `uri` | `Uri`: the `https://developer.android.com/reference/android/net/Uri` Uri to convert. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/Uri` | redacted version of the `uri`. Returns `null` when the given `https://developer.android.com/reference/android/net/Uri` could not be found or is unsupported <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/SecurityException` | if the caller doesn't have the read access to `uri` |

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#getRedactedUri(android.content.ContentResolver,%20java.util.List<android.net.Uri>)`

### getRedactedUri

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

```
public static List<Uri> getRedactedUri (ContentResolver resolver, 
                List<Uri> uris)
```

Returns a list of EXIF redacted version of `uris` i.e. a `https://developer.android.com/reference/android/net/Uri` with metadata
such as location, GPS datestamp etc. redacted from the EXIF headers.


A redacted Uri can be used to share a file with another application wherein exposing
sensitive information in EXIF headers is not desirable.
Note:
1. Order of the returned uris follow the order of the `uris`.
2. Redacted uris cannot be granted write access and can neither be used to perform any kind
of write operations.
3. To get a redacted uri the caller must hold read permission to its corresponding uri.

<br />

| Parameters ||
|---|---|
| `resolver` | `ContentResolver`: The `https://developer.android.com/reference/android/content/ContentResolver` used to connect with `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY`. Typically this value is gotten from `https://developer.android.com/reference/android/content/Context#getContentResolver()` This value cannot be `null`. <br /> |
| `uris` | `List`: the list of `https://developer.android.com/reference/android/net/Uri` Uri to convert. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/Uri>` | a list with redacted version of `uris`, in the same order. Returns `null` when the corresponding `https://developer.android.com/reference/android/net/Uri` could not be found or is unsupported <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if all the uris in `uris` don't belong to same user id |
| `https://developer.android.com/reference/java/lang/SecurityException` | if the caller doesn't have the read access to all the elements in `uris` |

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#getRedactedUri(android.content.ContentResolver,%20android.net.Uri)`

### getRequireOriginal

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

```
public static boolean getRequireOriginal (Uri uri)
```

Return if the caller requires the original file contents when calling
`https://developer.android.com/reference/android/content/ContentResolver#openFileDescriptor(android.net.Uri,%20java.lang.String)`.

<br />

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

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#setRequireOriginal(android.net.Uri)`

### getVersion

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

```
public static String getVersion (Context context, 
                String volumeName)
```

Return an opaque version string describing the `https://developer.android.com/reference/android/provider/MediaStore` state.


Applications that import data from `https://developer.android.com/reference/android/provider/MediaStore` into their own
caches can use this to detect that `https://developer.android.com/reference/android/provider/MediaStore` has undergone
substantial changes, and that data should be rescanned.


No other assumptions should be made about the meaning of the version.
It can return null if requested volume is not mounted. Apps should check
for volume to be present in `https://developer.android.com/reference/android/provider/MediaStore#getExternalVolumeNames(android.content.Context)`
before using this API.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: This value cannot be `null`. <br /> |
| `volumeName` | `String`: specific volume to obtain an opaque version string for. Must be one of the values returned from `https://developer.android.com/reference/android/provider/MediaStore#getExternalVolumeNames(android.content.Context)`. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getVersion

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

```
public static String getVersion (Context context)
```

Return an opaque version string describing the `https://developer.android.com/reference/android/provider/MediaStore` state.


Applications that import data from `https://developer.android.com/reference/android/provider/MediaStore` into their own
caches can use this to detect that `https://developer.android.com/reference/android/provider/MediaStore` has undergone
substantial changes, and that data should be rescanned.


No other assumptions should be made about the meaning of the version.
It can return null if external primary volume is not mounted. Apps should
check for volume to be present in `https://developer.android.com/reference/android/provider/MediaStore#getExternalVolumeNames(android.content.Context)`
before using this API.


This method returns the version for
`https://developer.android.com/reference/android/provider/MediaStore#VOLUME_EXTERNAL_PRIMARY`; to obtain a version for a
different volume, use `https://developer.android.com/reference/android/provider/MediaStore#getVersion(android.content.Context,%20java.lang.String)`.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getVolumeName

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

```
public static String getVolumeName (Uri uri)
```

Return the volume name that the given `https://developer.android.com/reference/android/net/Uri` references.

<br />

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

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value cannot be `null`. <br /> |

### isCurrentCloudMediaProviderAuthority

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [R Extensions 3](https://developer.android.com/sdkExtensions)

```
public static boolean isCurrentCloudMediaProviderAuthority (ContentResolver resolver, 
                String authority)
```

Returns `true` if and only if the caller with `authority` is the currently
enabled `https://developer.android.com/reference/android/provider/CloudMediaProvider`. More specifically, `false` is also returned
if the calling uid doesn't match the uid of the `authority`.

<br />

| Parameters ||
|---|---|
| `resolver` | `ContentResolver`: This value cannot be `null`. <br /> |
| `authority` | `String`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/provider/CloudMediaProvider`
- `https://developer.android.com/reference/android/provider/MediaStore#isSupportedCloudMediaProviderAuthority(android.content.ContentResolver,%20java.lang.String)`

### isCurrentSystemGallery

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

```
public static boolean isCurrentSystemGallery (ContentResolver resolver, 
                int uid, 
                String packageName)
```

Returns true if the given application is the current system gallery of the device.


The system gallery is one app chosen by the OEM that has read \& write access to all photos
and videos on the device and control over folders in media collections.

<br />

| Parameters ||
|---|---|
| `resolver` | `ContentResolver`: The `https://developer.android.com/reference/android/content/ContentResolver` used to connect with `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY`. Typically this value is `https://developer.android.com/reference/android/content/Context#getContentResolver()`. This value cannot be `null`. <br /> |
| `uid` | `int`: The uid to be checked if it is the current system gallery. <br /> |
| `packageName` | `String`: The package name to be checked if it is the current system gallery. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### isSupportedCloudMediaProviderAuthority

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [R Extensions 3](https://developer.android.com/sdkExtensions)

```
public static boolean isSupportedCloudMediaProviderAuthority (ContentResolver resolver, 
                String authority)
```

Returns `true` if and only if the caller with `authority` is a supported
`https://developer.android.com/reference/android/provider/CloudMediaProvider`. More specifically, `false` is also returned
if the calling uid doesn't match the uid of the `authority`.

<br />

| Parameters ||
|---|---|
| `resolver` | `ContentResolver`: This value cannot be `null`. <br /> |
| `authority` | `String`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/provider/CloudMediaProvider`
- `https://developer.android.com/reference/android/provider/MediaStore#isCurrentCloudMediaProviderAuthority(android.content.ContentResolver,%20java.lang.String)`

### markIsFavoriteStatus

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [R Extensions 16](https://developer.android.com/sdkExtensions)

```
public static void markIsFavoriteStatus (ContentResolver resolver, 
                Collection<Uri> uris, 
                boolean areFavorites)
```

Sets the media isFavorite status if the calling app has wider read permission on media
files for given type. Calling app should have one of READ_EXTERNAL_STORAGE or
WRITE_EXTERNAL_STORAGE if target sdk \<= T. For target sdk \> T, it
should have READ_MEDIA_IMAGES for images, READ_MEDIA_VIDEOS for videos or READ_MEDIA_AUDIO
for audio files or MANAGE_EXTERNAL_STORAGE permission.

<br />

| Parameters ||
|---|---|
| `resolver` | `ContentResolver`: used to connect with `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY` This value cannot be `null`. <br /> |
| `uris` | `Collection`: a collection of media items to include in this request. Each item must be hosted by `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY` and must reference a specific media item by `https://developer.android.com/reference/android/provider/BaseColumns#_ID` sample uri - content://media/external_primary/images/media/24. This value cannot be `null`. <br /> |
| `areFavorites` | `boolean`: the `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#IS_FAVORITE` value to apply. <br /> |

### notifyCloudMediaChangedEvent

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [R Extensions 3](https://developer.android.com/sdkExtensions)

```
public static void notifyCloudMediaChangedEvent (ContentResolver resolver, 
                String authority, 
                String currentMediaCollectionId)
```

Notifies the OS about a cloud media event requiring a full or incremental media collection
sync for the currently enabled cloud provider, `authority`.

The OS will schedule the sync in the background and will attempt to batch frequent
notifications into a single sync event.

If the caller is not the currently enabled cloud provider as returned by
`https://developer.android.com/reference/android/provider/MediaStore#isCurrentCloudMediaProviderAuthority(android.content.ContentResolver,%20java.lang.String)`, the request will be
unsuccessful.

<br />

| Parameters ||
|---|---|
| `resolver` | `ContentResolver`: This value cannot be `null`. <br /> |
| `authority` | `String`: This value cannot be `null`. <br /> |
| `currentMediaCollectionId` | `String`: This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/SecurityException` | if the request was unsuccessful. |

### openAssetFileDescriptor

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [R Extensions 15](https://developer.android.com/sdkExtensions)

```
public static AssetFileDescriptor openAssetFileDescriptor (ContentResolver resolver, 
                Uri uri, 
                String mode, 
                CancellationSignal cancellationSignal)
```

Works exactly the same as
`https://developer.android.com/reference/android/content/ContentResolver#openAssetFileDescriptor(android.net.Uri,%20java.lang.String,%20android.os.CancellationSignal)`,
but only works for `https://developer.android.com/reference/android/net/Uri` whose scheme is `https://developer.android.com/reference/android/content/ContentResolver#SCHEME_CONTENT`
and its authority is `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY`.


This API is preferred over
`https://developer.android.com/reference/android/content/ContentResolver#openAssetFileDescriptor(android.net.Uri,%20java.lang.String,%20android.os.CancellationSignal)` when opening
media Uri for ensuring system stability especially when opening URIs returned as a result of
using `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`

<br />

| Parameters ||
|---|---|
| `resolver` | `ContentResolver`: The `https://developer.android.com/reference/android/content/ContentResolver` used to connect with `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY`. Typically this value is gotten from `https://developer.android.com/reference/android/content/Context#getContentResolver()` This value cannot be `null`. <br /> |
| `uri` | `Uri`: The desired URI to open. This value cannot be `null`. <br /> |
| `mode` | `String`: The string representation of the file mode. Can be "r", "w", "wt", "wa", "rw" or "rwt". Please note the exact implementation of these may differ for each Provider implementation - for example, "w" may or may not truncate. This value cannot be `null`. <br /> |
| `cancellationSignal` | `CancellationSignal`: This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/res/AssetFileDescriptor` | a new ParcelFileDescriptor pointing to the file or `null` if the provider recently crashed. You own this descriptor and are responsible for closing it when done. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/FileNotFoundException` | if no file exists under the URI. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if The URI is not for `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY` |

### openFileDescriptor

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [R Extensions 15](https://developer.android.com/sdkExtensions)

```
public static ParcelFileDescriptor openFileDescriptor (ContentResolver resolver, 
                Uri uri, 
                String mode, 
                CancellationSignal cancellationSignal)
```

Works exactly the same as
`https://developer.android.com/reference/android/content/ContentResolver#openFileDescriptor(android.net.Uri,%20java.lang.String,%20android.os.CancellationSignal)`, but only works
for `https://developer.android.com/reference/android/net/Uri` whose scheme is `https://developer.android.com/reference/android/content/ContentResolver#SCHEME_CONTENT` and its authority is
`https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY`.


This API is preferred over
`https://developer.android.com/reference/android/content/ContentResolver#openFileDescriptor(android.net.Uri,%20java.lang.String,%20android.os.CancellationSignal)` when opening
media Uri for ensuring system stability especially when opening URIs returned as a result of
using `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`

<br />

| Parameters ||
|---|---|
| `resolver` | `ContentResolver`: The `https://developer.android.com/reference/android/content/ContentResolver` used to connect with `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY`. Typically this value is gotten from `https://developer.android.com/reference/android/content/Context#getContentResolver()` This value cannot be `null`. <br /> |
| `uri` | `Uri`: The desired URI to open. This value cannot be `null`. <br /> |
| `mode` | `String`: The string representation of the file mode. Can be "r", "w", "wt", "wa", "rw" or "rwt". Please note the exact implementation of these may differ for each Provider implementation - for example, "w" may or may not truncate. This value cannot be `null`. <br /> |
| `cancellationSignal` | `CancellationSignal`: A signal to cancel the operation in progress, or null if none. If the operation is canceled, then `https://developer.android.com/reference/android/os/OperationCanceledException` will be thrown. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/ParcelFileDescriptor` | a new ParcelFileDescriptor pointing to the file or `null` if the provider recently crashed. You own this descriptor and are responsible for closing it when done. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/FileNotFoundException` | if no file exists under the URI. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if The URI is not for `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY` |

### openTypedAssetFileDescriptor

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [R Extensions 15](https://developer.android.com/sdkExtensions)

```
public static AssetFileDescriptor openTypedAssetFileDescriptor (ContentResolver resolver, 
                Uri uri, 
                String mimeType, 
                Bundle opts, 
                CancellationSignal cancellationSignal)
```

Works exactly the same as
`https://developer.android.com/reference/android/content/ContentResolver#openTypedAssetFileDescriptor(android.net.Uri,%20java.lang.String,%20android.os.Bundle,%20android.os.CancellationSignal)`,
but only works for `https://developer.android.com/reference/android/net/Uri` whose scheme is `https://developer.android.com/reference/android/content/ContentResolver#SCHEME_CONTENT`
and its authority is `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY`.


This API is preferred over
`https://developer.android.com/reference/android/content/ContentResolver#openTypedAssetFileDescriptor(android.net.Uri,%20java.lang.String,%20android.os.Bundle,%20android.os.CancellationSignal)`
when opening media Uri for ensuring system stability especially when opening URIs returned
as a result of using `https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES`

<br />

| Parameters ||
|---|---|
| `resolver` | `ContentResolver`: The `https://developer.android.com/reference/android/content/ContentResolver` used to connect with `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY`. Typically this value is gotten from `https://developer.android.com/reference/android/content/Context#getContentResolver()` This value cannot be `null`. <br /> |
| `uri` | `Uri`: The desired URI to open. This value cannot be `null`. <br /> |
| `mimeType` | `String`: The desired MIME type of the returned data. This can be a pattern such as \*/\*, which will allow the content provider to select a type, though there is no way for you to determine what type it is returning. This value cannot be `null`. <br /> |
| `opts` | `Bundle`: Additional provider-dependent options. This value may be `null`. <br /> |
| `cancellationSignal` | `CancellationSignal`: This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/res/AssetFileDescriptor` | a new ParcelFileDescriptor from which you can read the data stream from the provider or `null` if the provider recently crashed. Note that this may be a pipe, meaning you can't seek in it. The only seek you should do is if the AssetFileDescriptor contains an offset, to move to that offset before reading. You own this descriptor and are responsible for closing it when done. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/FileNotFoundException` | if no data of the desired type exists under the URI. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if The URI is not for `https://developer.android.com/reference/android/provider/MediaStore#AUTHORITY` |

### queryDeletedFiles

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [S Extensions 23](https://developer.android.com/sdkExtensions)

```
public static Cursor queryDeletedFiles (ContentResolver resolver, 
                Bundle queryArgs, 
                CancellationSignal signal)
```

Returns a cursor of deleted items matching the given query arguments.


**Note:** This method only returns deleted items for external volumes.
Items deleted from the internal volume are not tracked or returned by this API.


**Note:** If an external volume (such as an SD card) is removed from the device,
its associated deleted items are no longer tracked or returned by this API.


The returned cursor includes columns such as `https://developer.android.com/reference/android/provider/BaseColumns#_ID`,
`https://developer.android.com/reference/android/provider/MediaStore.DeletedFiles.DeletedFilesColumns#MEDIA_TYPE`,
`https://developer.android.com/reference/android/provider/MediaStore.DeletedFiles.DeletedFilesColumns#DELETED_GENERATION`, and
`https://developer.android.com/reference/android/provider/MediaStore.DeletedFiles.DeletedFilesColumns#VOLUME_NAME`.

<br />

| Parameters ||
|---|---|
| `resolver` | `ContentResolver`: The ContentResolver to use for the call. This value cannot be `null`. <br /> |
| `queryArgs` | `Bundle`: Arguments for the query. Supported arguments include `https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_SQL_SELECTION`, `https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_SQL_SELECTION_ARGS`, `https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_SQL_SORT_ORDER`, `https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_LIMIT`, and `https://developer.android.com/reference/android/content/ContentResolver#QUERY_ARG_OFFSET`. The selection and sort order can filter and sort on any of the columns defined in `https://developer.android.com/reference/android/provider/MediaStore.DeletedFiles.DeletedFilesColumns`. This value may be `null`. <br /> |
| `signal` | `CancellationSignal`: A cancellation signal to cancel the operation in progress. This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/database/Cursor` | A cursor of deleted items, or null if the operation failed. <br /> |

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore.DeletedFiles.DeletedFilesColumns`

### restoreFileFromTrash

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [S Extensions 22](https://developer.android.com/sdkExtensions)

```
public static String restoreFileFromTrash (ContentResolver resolver, 
                String path, 
                String targetPath)
```

Restores a file or directory from a trashed state.


The item will be restored from the system's trash to its original location by default.
If the original parent directories do not exist, they will be created as part of the
restoration process. Optionally, a new `targetPath` can be specified to restore
the item to a different location. If the specified `path` refers to a trashed
directory, all its trashed contents will also be restored.
If restoring a file would create a name conflict with an existing file, the system
resolves this by appending a numerical suffix. For example, if `image.jpeg` exists,
the restored file will be named `image (1).jpeg`.


Apps using this API must declare the
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_EXTERNAL_STORAGE` permission
in their manifest and be granted it by the user.

<br />

<br />

| Parameters ||
|---|---|
| `resolver` | `ContentResolver`: The `https://developer.android.com/reference/android/content/ContentResolver` to use for the call. This value cannot be `null`. <br /> |
| `path` | `String`: The absolute path of the trashed file or directory to be restored. This path should be the path of the item as it exists in the trash. This value cannot be `null`. <br /> |
| `targetPath` | `String`: An optional absolute path where the item should be restored. If `null`, the item will be restored to its original location prior to being trashed. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The absolute path of the item after it has been restored. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | If the provided `path` is null or empty, or if the `targetPath` (if provided) is invalid. |
| `https://developer.android.com/reference/java/lang/IllegalStateException` | If the restoration operation fails due to an unexpected internal system error, such as the system being unable to restore the file |
| `https://developer.android.com/reference/java/lang/SecurityException` | if the caller lacks the `https://developer.android.com/reference/android/Manifest.permission#MANAGE_EXTERNAL_STORAGE` permission. |

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#trashFile(android.content.ContentResolver,%20java.lang.String)`

### setIncludePending

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

```
public static Uri setIncludePending (Uri uri)
```


**This method was deprecated
in API level 30.**   

consider migrating to `https://developer.android.com/reference/android/provider/MediaStore#QUERY_ARG_MATCH_PENDING` which
is more expressive.

Update the given `https://developer.android.com/reference/android/net/Uri` to also include any pending media items from
calls such as
`https://developer.android.com/reference/android/content/ContentResolver#query(android.net.Uri,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)`.
By default no pending items are returned.

<br />

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

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/Uri` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore.MediaColumns#IS_PENDING`

### setRequireOriginal

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

```
public static Uri setRequireOriginal (Uri uri)
```

Update the given `https://developer.android.com/reference/android/net/Uri` to indicate that the caller requires the
original file contents when calling
`https://developer.android.com/reference/android/content/ContentResolver#openFileDescriptor(android.net.Uri,%20java.lang.String)`.


This can be useful when the caller wants to ensure they're backing up the
exact bytes of the underlying media, without any Exif redaction being
performed.


If the original file contents cannot be provided, a
`https://developer.android.com/reference/java/lang/UnsupportedOperationException` will be thrown when the returned
`https://developer.android.com/reference/android/net/Uri` is used, such as when the caller doesn't hold
`https://developer.android.com/reference/android/Manifest.permission#ACCESS_MEDIA_LOCATION`.

<br />

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

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/Uri` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#getRequireOriginal(android.net.Uri)`

### trashFile

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [S Extensions 22](https://developer.android.com/sdkExtensions)

```
public static String trashFile (ContentResolver resolver, 
                String path)
```

Moves a file or directory to a trashed state.


If the specified `path` is a directory, all its contents (files and subdirectories)
will also be trashed recursively.


Apps using this API must declare the
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_EXTERNAL_STORAGE` permission
in their manifest and be granted it by the user.

<br />

<br />

| Parameters ||
|---|---|
| `resolver` | `ContentResolver`: The `https://developer.android.com/reference/android/content/ContentResolver` to use for the call. This value cannot be `null`. <br /> |
| `path` | `String`: The absolute path of the file or directory to be trashed. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The path of the item that was trashed, which may differ from the input path if the system modifies it for trash management. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the file path is null or empty. |
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if the trash directory cannot be created or if the file cannot be trashed. |
| `https://developer.android.com/reference/java/lang/SecurityException` | if the caller lacks the `https://developer.android.com/reference/android/Manifest.permission#MANAGE_EXTERNAL_STORAGE` permission. |

**See also:**

- `https://developer.android.com/reference/android/provider/MediaStore#restoreFileFromTrash(android.content.ContentResolver,%20java.lang.String,%20java.lang.String)`