Language

MediaStore.ExtraPickImagesSelectionParams Field

Definition

The name of an optional intent-extra used to pass android.widget.photopicker.PhotoPickerSelectionParams to the photo picker.

[Android.Runtime.Register("EXTRA_PICK_IMAGES_SELECTION_PARAMS", ApiSince=37)]
public const string ExtraPickImagesSelectionParams;
[<Android.Runtime.Register("EXTRA_PICK_IMAGES_SELECTION_PARAMS", ApiSince=37)>]
val mutable ExtraPickImagesSelectionParams : string

Field Value

Attributes

Remarks

The name of an optional intent-extra used to pass PhotoPickerSelectionParams to the photo picker. This extra can only be specified in MediaStore.ACTION_PICK_IMAGES.

The 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 android.content.Intent.setType(String) extra).

To use this key, calling apps should construct a PhotoPickerSelectionParams object using its PhotoPickerSelectionParams.Builder and pass it as the value.

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);

Android reference for android.provider.MediaStore.EXTRA_PICK_IMAGES_SELECTION_PARAMS.

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.

Applies to