Android: Let user pick image or video from Gallery

后端 未结 8 611
死守一世寂寞
死守一世寂寞 2021-01-30 20:44

Is it possible to to start Gallery in such a way so both pictures and videos are shown?

Thanks

8条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-30 21:21

    You need use the following as picking Intent

    Intent photoLibraryIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
    photoLibraryIntent.setType("image/* video/*");
    

提交回复
热议问题