/**@class android.provider.MediaStore @extends java.lang.Object The contract between the media provider and applications. Contains definitions for the supported URIs and columns. <p> The media provider provides an indexed collection of common media types, such as {@link android.provider.MediaStore.Audio}, {@link android.provider.MediaStore.Video}, and {@link android.provider.BrowserContract.Images}, from any attached storage devices. Each collection is organized based on the primary MIME type of the underlying content; for example, {@code image/*} content is indexed under {@link android.provider.BrowserContract.Images}. The {@link android.provider.MediaStore.Files} collection provides a broad view across all collections, and does not filter by MIME type. */ var MediaStore = { /**The authority for the media provider */ AUTHORITY : "media", /**A content:// style uri to the authority for the media provider */ AUTHORITY_URI : "null", /** Synthetic volume name that provides a view of all content across the "internal" storage of the device. <p> This synthetic volume provides a merged view of all media distributed with the device, such as built-in ringtones and wallpapers. <p> Because this is a synthetic volume, you can't insert new content into this volume. */ VOLUME_INTERNAL : "internal", /** Synthetic volume name that provides a view of all content across the "external" storage of the device. <p> This synthetic volume provides a merged view of all media across all currently attached external storage devices. <p> 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 {@link #getExternalVolumeNames}(Context). */ VOLUME_EXTERNAL : "external", /** Specific volume name that represents the primary external storage device at {@link Environment#getExternalStorageDirectory()}. <p> 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 {@link #getExternalVolumeNames}(Context). */ VOLUME_EXTERNAL_PRIMARY : "external_primary", /**{@hide} */ SCAN_FILE_CALL : "scan_file", /**{@hide} */ SCAN_VOLUME_CALL : "scan_volume", /** Extra used with {@link #SCAN_FILE_CALL} or {@link #SCAN_VOLUME_CALL} to indicate that the file path originated from shell. {@hide} */ EXTRA_ORIGINATED_FROM_SHELL : "android.intent.extra.originated_from_shell", /** The method name used by the media scanner and mtp to tell the media provider to rescan and reclassify that have become unhidden because of renaming folders or removing nomedia files @hide */ UNHIDE_CALL : "unhide", /** The method name used by the media scanner service to reload all localized ringtone titles due to a locale change. @hide */ RETRANSLATE_CALL : "update_titles", /**{@hide} */ GET_VERSION_CALL : "get_version", /**{@hide} */ GET_DOCUMENT_URI_CALL : "get_document_uri", /**{@hide} */ GET_MEDIA_URI_CALL : "get_media_uri", /**{@hide} */ GET_CONTRIBUTED_MEDIA_CALL : "get_contributed_media", /**{@hide} */ DELETE_CONTRIBUTED_MEDIA_CALL : "delete_contributed_media", /** This is for internal use by the media scanner only. Name of the (optional) Uri parameter that determines whether to skip deleting the file pointed to by the _data column, when deleting the database entry. The only appropriate value for this parameter is "false", in which case the delete will be skipped. Note especially that setting this to true, or omitting the parameter altogether, will perform the default action, which is different for different types of media. @hide */ PARAM_DELETE_DATA : "deletedata", /**{@hide} */ PARAM_INCLUDE_PENDING : "includePending", /**{@hide} */ PARAM_INCLUDE_TRASHED : "includeTrashed", /**{@hide} */ PARAM_PROGRESS : "progress", /**{@hide} */ PARAM_REQUIRE_ORIGINAL : "requireOriginal", /**{@hide} */ PARAM_LIMIT : "limit", /** Activity Action: Launch a music player. The activity should be able to play, browse, or manipulate music files stored on the device. @deprecated Use {@link android.content.Intent#CATEGORY_APP_MUSIC} instead. */ INTENT_ACTION_MUSIC_PLAYER : "android.intent.action.MUSIC_PLAYER", /** Activity Action: Perform a search for media. Contains at least the {@link 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 @see android.provider.MediaStore#EXTRA_MEDIA_ARTIST @see android.provider.MediaStore#EXTRA_MEDIA_ALBUM @see android.provider.MediaStore#EXTRA_MEDIA_TITLE @see android.provider.MediaStore#EXTRA_MEDIA_FOCUS */ INTENT_ACTION_MEDIA_SEARCH : "android.intent.action.MEDIA_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. <p>This intent always includes the {@link android.provider.MediaStore#EXTRA_MEDIA_FOCUS} and {@link android.app.SearchManager#QUERY} extras. The {@link android.provider.MediaStore#EXTRA_MEDIA_FOCUS} extra determines the search mode, and the value of the {@link android.app.SearchManager#QUERY} extra depends on the search mode. For more information about the search modes for this intent, see <a href="{@docRoot}guide/components/intents-common.html#PlaySearch">Play music based on a search query</a> in <a href="{@docRoot}guide/components/intents-common.html">Common Intents</a>.</p> <p>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.</p> */ INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH : "android.media.action.MEDIA_PLAY_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. <p> Contains the {@link 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. <p> 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. */ INTENT_ACTION_TEXT_OPEN_FROM_SEARCH : "android.media.action.TEXT_OPEN_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. <p> Contains the {@link 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. <p> 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. */ INTENT_ACTION_VIDEO_PLAY_FROM_SEARCH : "android.media.action.VIDEO_PLAY_FROM_SEARCH", /** The name of the Intent-extra used to define the artist */ EXTRA_MEDIA_ARTIST : "android.intent.extra.artist", /** The name of the Intent-extra used to define the album */ EXTRA_MEDIA_ALBUM : "android.intent.extra.album", /** The name of the Intent-extra used to define the song title */ EXTRA_MEDIA_TITLE : "android.intent.extra.title", /** The name of the Intent-extra used to define the genre. */ EXTRA_MEDIA_GENRE : "android.intent.extra.genre", /** The name of the Intent-extra used to define the playlist. */ EXTRA_MEDIA_PLAYLIST : "android.intent.extra.playlist", /** The name of the Intent-extra used to define the radio channel. */ EXTRA_MEDIA_RADIO_CHANNEL : "android.intent.extra.radio_channel", /** 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. */ EXTRA_MEDIA_FOCUS : "android.intent.extra.focus", /** 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. @see android.content.pm.ActivityInfo#SCREEN_ORIENTATION_UNSPECIFIED */ EXTRA_SCREEN_ORIENTATION : "android.intent.extra.screenOrientation", /** 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. */ EXTRA_FULL_SCREEN : "android.intent.extra.fullScreen", /** 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. */ EXTRA_SHOW_ACTION_ICONS : "android.intent.extra.showActionIcons", /** 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. */ EXTRA_FINISH_ON_COMPLETION : "android.intent.extra.finishOnCompletion", /** The name of the Intent action used to launch a camera in still image mode. */ INTENT_ACTION_STILL_IMAGE_CAMERA : "android.media.action.STILL_IMAGE_CAMERA", /** Name under which an activity handling {@link #INTENT_ACTION_STILL_IMAGE_CAMERA} or {@link #INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE} publishes the service name for its prewarm service. <p> This meta-data should reference the fully qualified class name of the prewarm service extending {@link CameraPrewarmService}. <p> The prewarm service will get bound and receive a prewarm signal {@link 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. */ META_DATA_STILL_IMAGE_CAMERA_PREWARM_SERVICE : "android.media.still_image_camera_preview_service", /** 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 {@link Activity#setShowWhenLocked} 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. */ INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE : "android.media.action.STILL_IMAGE_CAMERA_SECURE", /** The name of the Intent action used to launch a camera in video mode. */ INTENT_ACTION_VIDEO_CAMERA : "android.media.action.VIDEO_CAMERA", /** Standard Intent action that can be sent to have the camera application capture an image and return it. <p> 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 {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this uri can also be supplied through {@link android.content.Intent#setClipData(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 {@link Context#startActivity(Intent)}. <p>Note: if you app targets {@link android.os.Build.VERSION_CODES#M M} and above and declares as using the {@link android.Manifest.permission#CAMERA} permission which is not granted, then attempting to use this action will result in a {@link java.lang.SecurityException}. @see #EXTRA_OUTPUT */ ACTION_IMAGE_CAPTURE : "android.media.action.IMAGE_CAPTURE", /** 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 {@link Activity#setShowWhenLocked} 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. <p> 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 {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this uri can also be supplied through {@link android.content.Intent#setClipData(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 {@link Context#startActivity(Intent)}. @see #ACTION_IMAGE_CAPTURE @see #EXTRA_OUTPUT */ ACTION_IMAGE_CAPTURE_SECURE : "android.media.action.IMAGE_CAPTURE_SECURE", /** Standard Intent action that can be sent to have the camera application capture a video and return it. <p> The caller may pass in an extra EXTRA_VIDEO_QUALITY to control the video quality. <p> 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. As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this uri can also be supplied through {@link android.content.Intent#setClipData(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 {@link Context#startActivity(Intent)}. <p>Note: if you app targets {@link android.os.Build.VERSION_CODES#M M} and above and declares as using the {@link android.Manifest.permission#CAMERA} permission which is not granted, then atempting to use this action will result in a {@link java.lang.SecurityException}. @see #EXTRA_OUTPUT @see #EXTRA_VIDEO_QUALITY @see #EXTRA_SIZE_LIMIT @see #EXTRA_DURATION_LIMIT */ ACTION_VIDEO_CAPTURE : "android.media.action.VIDEO_CAPTURE", /** Standard action that can be sent to review the given media file. <p> 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. <p> Input: {@link Intent#getData} is URI of the primary media item to initially display. @see #ACTION_REVIEW_SECURE @see #EXTRA_BRIGHTNESS */ ACTION_REVIEW : "android.provider.action.REVIEW", /** 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 {@link Activity#setShowWhenLocked} 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. <p> 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. <p> Input: {@link Intent#getData} is URI of the primary media item to initially display. {@link Intent#getClipData} is the limited list of secondary media items that the user is allowed to review. If {@link Intent#getClipData} is undefined, then no other media access should be allowed. @see #EXTRA_BRIGHTNESS */ ACTION_REVIEW_SECURE : "android.provider.action.REVIEW_SECURE", /** When defined, the launched application is requested to set the given brightness value via {@link android.view.WindowManager.LayoutParams#screenBrightness} to help ensure a smooth transition when launching {@link #ACTION_REVIEW} or {@link #ACTION_REVIEW_SECURE} intents. */ EXTRA_BRIGHTNESS : "android.provider.extra.BRIGHTNESS", /** 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. */ EXTRA_VIDEO_QUALITY : "android.intent.extra.videoQuality", /** Specify the maximum allowed size. */ EXTRA_SIZE_LIMIT : "android.intent.extra.sizeLimit", /** Specify the maximum allowed recording duration in seconds. */ EXTRA_DURATION_LIMIT : "android.intent.extra.durationLimit", /** The name of the Intent-extra used to indicate a content resolver Uri to be used to store the requested image or video. */ EXTRA_OUTPUT : "output", /** 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. */ UNKNOWN_STRING : "<unknown>", /** Name of current volume being scanned by the media scanner. */ MEDIA_SCANNER_VOLUME : "volume", /** 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. */ MEDIA_IGNORE_FILENAME : ".nomedia", /**Update the given {@link Uri} to also include any pending media items from calls such as {@link ContentResolver#query(Uri, String[], Bundle, CancellationSignal)}. By default no pending items are returned. @see MediaColumns#IS_PENDING @see MediaStore#setIncludePending(Uri) */ setIncludePending : function( ) {}, /** @hide */ setIncludePending : function( ) {}, /**Update the given {@link Uri} to also include any trashed media items from calls such as {@link ContentResolver#query(Uri, String[], Bundle, CancellationSignal)}. By default no trashed items are returned. @see MediaColumns#IS_TRASHED @see MediaStore#setIncludeTrashed(Uri) @see MediaStore#trash(Context, Uri) @see MediaStore#untrash(Context, Uri) @removed */ setIncludeTrashed : function( ) {}, /**Update the given {@link Uri} to indicate that the caller requires the original file contents when calling {@link ContentResolver#openFileDescriptor(Uri, String)}. <p> 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. <p> If the original file contents cannot be provided, a {@link UnsupportedOperationException} will be thrown when the returned {@link Uri} is used, such as when the caller doesn't hold {@link android.Manifest.permission#ACCESS_MEDIA_LOCATION}. */ setRequireOriginal : function( ) {}, /**Create a new pending media item using the given parameters. Pending items are expected to have a short lifetime, and owners should either {@link android.provider.MediaStore.PendingSession#publish()} or {@link android.provider.MediaStore.PendingSession#abandon()} a pending item within a few hours after first creating it. @return {Object {android.net.Uri}} token which can be passed to {@link #openPending(Context, Uri)} to work with this pending item. @see MediaColumns#IS_PENDING @see MediaStore#setIncludePending(Uri) @see MediaStore#createPending(Context, PendingParams) @removed */ createPending : function( ) {}, /**Open a pending media item to make progress on it. You can open a pending item multiple times before finally calling either {@link android.provider.MediaStore.PendingSession#publish()} or {@link android.provider.MediaStore.PendingSession#abandon()}. @param {Object {Context}} uri token which was previously returned from {@link #createPending(Context, PendingParams)}. @removed */ openPending : function( ) {}, /**Mark the given item as being "trashed", meaning it should be deleted at some point in the future. This is a more gentle operation than simply calling {@link ContentResolver#delete(Uri, String, String[])}, which would take effect immediately. <p> This method preserves trashed items for at least 48 hours before erasing them, giving the user a chance to untrash the item. @see MediaColumns#IS_TRASHED @see MediaStore#setIncludeTrashed(Uri) @see MediaStore#trash(Context, Uri) @see MediaStore#untrash(Context, Uri) @removed */ trash : function( ) {}, /**Mark the given item as being "trashed", meaning it should be deleted at some point in the future. This is a more gentle operation than simply calling {@link ContentResolver#delete(Uri, String, String[])}, which would take effect immediately. <p> This method preserves trashed items for at least the given timeout before erasing them, giving the user a chance to untrash the item. @see MediaColumns#IS_TRASHED @see MediaStore#setIncludeTrashed(Uri) @see MediaStore#trash(Context, Uri) @see MediaStore#untrash(Context, Uri) @removed */ trash : function( ) {}, /**Mark the given item as being "untrashed", meaning it should no longer be deleted as previously requested through {@link #trash(Context, Uri)}. @see MediaColumns#IS_TRASHED @see MediaStore#setIncludeTrashed(Uri) @see MediaStore#trash(Context, Uri) @see MediaStore#untrash(Context, Uri) @removed */ untrash : function( ) {}, /**{@hide} */ getVolumeName : function( ) {}, /** @removed */ getAllVolumeNames : function( ) {}, /**Return list of all specific volume names that make up {@link #VOLUME_EXTERNAL}. This includes a unique volume name for each shared storage device that is currently attached, which typically includes {@link android.provider.MediaStore#VOLUME_EXTERNAL_PRIMARY}. <p> Each specific volume name can be passed to APIs like {@link android.provider.MediaStore.Images.Media#getContentUri(String)} to interact with media on that storage device. */ getExternalVolumeNames : function( ) {}, /**Return the volume name that the given {@link Uri} references. */ getVolumeName : function( ) {}, /**{@hide} */ checkArgumentVolumeName : function( ) {}, /**Return path where the given specific volume is mounted. Not valid for {@link #VOLUME_INTERNAL} or {@link #VOLUME_EXTERNAL}, since those are broad collections that cover many paths. @hide */ getVolumePath : function( ) {}, /**{@hide} */ getVolumePath : function( ) {}, /**Return paths that should be scanned for the given volume. @hide */ getVolumeScanPaths : function( ) {}, /**Uri for querying the state of the media scanner. */ getMediaScannerUri : function( ) {}, /**Return an opaque version string describing the {@link android.provider.MediaStore} state. <p> Applications that import data from {@link android.provider.MediaStore} into their own caches can use this to detect that {@link android.provider.MediaStore} has undergone substantial changes, and that data should be rescanned. <p> No other assumptions should be made about the meaning of the version. <p> This method returns the version for {@link android.provider.MediaStore#VOLUME_EXTERNAL_PRIMARY}; to obtain a version for a different volume, use {@link #getVersion(Context, String)}. */ getVersion : function( ) {}, /**Return an opaque version string describing the {@link android.provider.MediaStore} state. <p> Applications that import data from {@link android.provider.MediaStore} into their own caches can use this to detect that {@link android.provider.MediaStore} has undergone substantial changes, and that data should be rescanned. <p> No other assumptions should be made about the meaning of the version. @param {Object {Context}} volumeName specific volume to obtain an opaque version string for. Must be one of the values returned from {@link #getExternalVolumeNames(Context)}. */ getVersion : function( ) {}, /**Return a {@link android.provider.DocumentsContract.DocumentsProvider} Uri that is an equivalent to the given {@link android.provider.MediaStore} Uri. <p> This allows apps with Storage Access Framework permissions to convert between {@link android.provider.MediaStore} and {@link android.provider.DocumentsContract.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 {@link Intent#ACTION_OPEN_DOCUMENT} or related APIs. @param {Object {Context}} mediaUri The {@link MediaStore} Uri to convert. @return {Object {android.net.Uri}} An equivalent {@link DocumentsProvider} Uri. Returns {@code null} if no equivalent was found. @see #getMediaUri(Context, Uri) */ getDocumentUri : function( ) {}, /**Return a {@link android.provider.MediaStore} Uri that is an equivalent to the given {@link android.provider.DocumentsContract.DocumentsProvider} Uri. <p> This allows apps with Storage Access Framework permissions to convert between {@link android.provider.MediaStore} and {@link android.provider.DocumentsContract.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 {@link Intent#ACTION_OPEN_DOCUMENT} or related APIs. @param {Object {Context}} documentUri The {@link DocumentsProvider} Uri to convert. @return {Object {android.net.Uri}} An equivalent {@link MediaStore} Uri. Returns {@code null} if no equivalent was found. @see #getDocumentUri(Context, Uri) */ getMediaUri : function( ) {}, /**Calculate size of media contributed by given package under the calling user. The meaning of "contributed" means it won't automatically be deleted when the app is uninstalled. @hide */ getContributedMediaSize : function( ) {}, /**Delete all media contributed by given package under the calling user. The meaning of "contributed" means it won't automatically be deleted when the app is uninstalled. @hide */ deleteContributedMedia : function( ) {}, /** @hide */ scanFile : function( ) {}, /** @hide */ scanFileFromShell : function( ) {}, /** @hide */ scanVolume : function( ) {}, };