public final class MediaStore extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MediaStore.Audio
Container for all audio content.
|
static class |
MediaStore.Files
Media provider table containing an index of all files in the media storage,
including non-media files.
|
static class |
MediaStore.Images
Contains meta data for all available images.
|
static interface |
MediaStore.MediaColumns
Common fields for most MediaProvider tables
|
static class |
MediaStore.Video |
Modifier and Type | Field and Description |
---|---|
static String |
ACTION_IMAGE_CAPTURE
Standard Intent action that can be sent to have the camera application
capture an image and return it.
|
static 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.
|
static String |
ACTION_MTP_SESSION_END
Broadcast Action: A broadcast to indicate the end of an MTP session with the host.
|
static String |
ACTION_VIDEO_CAPTURE
Standard Intent action that can be sent to have the camera application
capture a video and return it.
|
static String |
AUTHORITY |
static String |
EXTRA_DURATION_LIMIT
Specify the maximum allowed recording duration in seconds.
|
static String |
EXTRA_FINISH_ON_COMPLETION
The name of the Intent-extra used to control the onCompletion behavior of a MovieView.
|
static String |
EXTRA_FULL_SCREEN
The name of an Intent-extra used to control the UI of a ViewImage.
|
static String |
EXTRA_MEDIA_ALBUM
The name of the Intent-extra used to define the album
|
static String |
EXTRA_MEDIA_ARTIST
The name of the Intent-extra used to define the artist
|
static String |
EXTRA_MEDIA_FOCUS
The name of the Intent-extra used to define the search focus.
|
static String |
EXTRA_MEDIA_TITLE
The name of the Intent-extra used to define the song title
|
static 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.
|
static String |
EXTRA_SCREEN_ORIENTATION
The name of the Intent-extra used to control the orientation of a ViewImage or a MovieView.
|
static String |
EXTRA_SHOW_ACTION_ICONS
The name of an Intent-extra used to control the UI of a ViewImage.
|
static String |
EXTRA_SIZE_LIMIT
Specify the maximum allowed size.
|
static String |
EXTRA_VIDEO_QUALITY
The name of the Intent-extra used to control the quality of a recorded video.
|
static 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.
|
static String |
INTENT_ACTION_MEDIA_SEARCH
Activity Action: Perform a search for media.
|
static String |
INTENT_ACTION_MUSIC_PLAYER
Deprecated.
Use
Intent.CATEGORY_APP_MUSIC instead. |
static String |
INTENT_ACTION_STILL_IMAGE_CAMERA
The name of the Intent action used to launch a camera in still image mode.
|
static 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.
|
static 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.
|
static String |
INTENT_ACTION_VIDEO_CAMERA
The name of the Intent action used to launch a camera in video mode.
|
static 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.
|
static String |
MEDIA_IGNORE_FILENAME
Name of the file signaling the media scanner to ignore media in the containing directory
and its subdirectories.
|
static String |
MEDIA_SCANNER_VOLUME
Name of current volume being scanned by the media scanner.
|
static String |
PARAM_DELETE_DATA
This is for internal use by the media scanner only.
|
static String |
UNHIDE_CALL
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
|
static String |
UNKNOWN_STRING
The string that is used when a media attribute is not known.
|
Constructor and Description |
---|
MediaStore() |
Modifier and Type | Method and Description |
---|---|
static Uri |
getMediaScannerUri()
Uri for querying the state of the media scanner.
|
static String |
getVersion(Context context)
Get the media provider's version.
|
public static final String AUTHORITY
public static final String ACTION_MTP_SESSION_END
public static final String UNHIDE_CALL
public static final String PARAM_DELETE_DATA
@Deprecated public static final String INTENT_ACTION_MUSIC_PLAYER
Intent.CATEGORY_APP_MUSIC
instead.public static final String INTENT_ACTION_MEDIA_SEARCH
SearchManager.QUERY
extra.
May also contain any combination of the following extras:
EXTRA_MEDIA_ARTIST, EXTRA_MEDIA_ALBUM, EXTRA_MEDIA_TITLE, EXTRA_MEDIA_FOCUSpublic static final String INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH
Contains the SearchManager.QUERY
extra, which is a string
that can contain any type of unstructured music search, like the name of an artist,
an album, a song, 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 music, such as services connected to an online database of music which can be streamed and played on the device.
public static final String INTENT_ACTION_TEXT_OPEN_FROM_SEARCH
Contains the 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.
public static final String INTENT_ACTION_VIDEO_PLAY_FROM_SEARCH
Contains the 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.
public static final String EXTRA_MEDIA_ARTIST
public static final String EXTRA_MEDIA_ALBUM
public static final String EXTRA_MEDIA_TITLE
public static final String EXTRA_MEDIA_FOCUS
public static final String EXTRA_SCREEN_ORIENTATION
android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
,
Constant Field Valuespublic static final String EXTRA_FULL_SCREEN
public static final String EXTRA_SHOW_ACTION_ICONS
public static final String EXTRA_FINISH_ON_COMPLETION
public static final String INTENT_ACTION_STILL_IMAGE_CAMERA
public static final String INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
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.public static final String INTENT_ACTION_VIDEO_CAMERA
public static final String ACTION_IMAGE_CAPTURE
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.
EXTRA_OUTPUT
,
Constant Field Valuespublic static final String ACTION_IMAGE_CAPTURE_SECURE
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
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.
public static final String ACTION_VIDEO_CAPTURE
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.
public static final String EXTRA_VIDEO_QUALITY
public static final String EXTRA_SIZE_LIMIT
public static final String EXTRA_DURATION_LIMIT
public static final String EXTRA_OUTPUT
public static final String UNKNOWN_STRING
public static final String MEDIA_SCANNER_VOLUME
public static final String MEDIA_IGNORE_FILENAME
public static Uri getMediaScannerUri()
public static String getVersion(Context context)
context
- Context to use for performing the query.