Multiple MIME types in Android

后端 未结 6 2039
走了就别回头了
走了就别回头了 2020-12-01 00:42

Is there a way to use intent.setType() and supply multiple broad types (like images and video)?

I am using an ACTION_GET_CONTENT.

6条回答
  •  甜味超标
    2020-12-01 01:03

    Actually, multiple mime-types are supported. Have you even tried it???

    For example: intent.setType("image/*,video/*") will display photos and videos...

    For me it works. It should work for you too...

    [EDIT]: This works partially, as not all the gallery apps choose to implement support for multiple mime types filters.

提交回复
热议问题