I'd like to use Android PhotoPicker, then I want multi MIME type that can JPEG, PNG but can only single MIME type, how can I get it?
// Launch the photo picker and let the user choose only images/videos of a
// specific MIME type, such as GIFs.
val mimeType = "image/gif"
pickMedia.launch(PickVisualMediaRequest(PickVisualMedia.SingleMimeType(mimeType)))
https://developer.android.com/training/data-storage/shared/photopicker
You can create a subclass of PickVisualMedia as follows:
According to the following document, when using EXTRA_MIME_TYPES, the MIME type should be set to "/". That's the reason for setting SingleMimeType to "/".
https://developer.android.com/guide/components/intents-common