PhotoPickerSelectionParams.Builder.SetMimeTypes(IList<String>) Method
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.
Sets the list of MIME types that are allowed for selection.
[Android.Runtime.Register("setMimeTypes", "(Ljava/util/List;)Landroid/widget/photopicker/PhotoPickerSelectionParams$Builder;", "", ApiSince=37)]
public Android.Widget.PhotoPicker.PhotoPickerSelectionParams.Builder SetMimeTypes(System.Collections.Generic.IList<string> mimeTypes);
[<Android.Runtime.Register("setMimeTypes", "(Ljava/util/List;)Landroid/widget/photopicker/PhotoPickerSelectionParams$Builder;", "", ApiSince=37)>]
member this.SetMimeTypes : System.Collections.Generic.IList<string> -> Android.Widget.PhotoPicker.PhotoPickerSelectionParams.Builder
Parameters
Returns
- Attributes
Remarks
Sets the list of MIME types that are allowed for selection.
Media items that violate this constraint will be disabled for selection.
This parameter is different from the MIME types which can be specified in android.content.Intent.setType(String) extra or Intent.EXTRA_MIME_TYPES, when those are used to launch the photo picker, they will filter out any media items which has a MIME type not added to them. While the MIME Types defined by this API will still exist in photo picker media grid, but disabled from selection.
Filter media items using the MIME Types defined in android.content.Intent.setType(String) extra or Intent.EXTRA_MIME_TYPES will happen first, before disabling the media items based on the MIME Types passed to this API.
Callers must indicate the acceptable document MIME types. For example, to select photos, use image/*.
If it is not set, no MIME type constraint will be enforced on the media items the user can select.
Android reference for android.widget.photopicker.PhotoPickerSelectionParams.Builder.setMimeTypes.
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.