MediaStore.ActionPickImages Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Activity Action: Allow the user to select images or videos provided by system and return it.
[Android.Runtime.Register("ACTION_PICK_IMAGES", ApiSince=33)]
public const string ActionPickImages;
[<Android.Runtime.Register("ACTION_PICK_IMAGES", ApiSince=33)>]
val mutable ActionPickImages : string
Field Value
- Attributes
Remarks
Activity Action: Allow the user to select images or videos provided by system and return it. This is different than Intent#ACTION_PICK
and Intent#ACTION_GET_CONTENT
in that
<ul> <li>the data for this action is provided by the system <li>this action is only used for picking images and videos <li>caller gets read access to user picked items even without storage permissions </ul>
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 Intent#setType(String)
.
If the caller needs multiple returned items (or caller wants to allow multiple selection), then it can specify MediaStore#EXTRA_PICK_IMAGES_MAX
to indicate this.
When the caller requests multiple selection, the value of MediaStore#EXTRA_PICK_IMAGES_MAX
must be a positive integer greater than 1 and less than or equal to MediaStore#getPickImagesMaxLimit
, otherwise Activity#RESULT_CANCELED
is returned. Use MediaStore#EXTRA_PICK_IMAGES_IN_ORDER
in multiple selection mode to allow the user to pick images in order.
Callers may use Intent#EXTRA_LOCAL_ONLY
to limit content selection to local data.
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 PickerMediaColumns
.
Before this API, apps could use Intent#ACTION_GET_CONTENT
. However, #ACTION_PICK_IMAGES
is now the recommended option for images and videos, since it offers a better user experience.
Java documentation for android.provider.MediaStore.ACTION_PICK_IMAGES
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.