Android ACTION_VIEW Multiple Images

情到浓时终转凉″ 提交于 2019-12-01 22:10:03
Huang

I think your goal is out of your control. If the viewer app is designed to handle mutiple images or a directory, you may ask it to show as you want, but you are defined to the viewer's pattern.

I have installed a third-party image viewer called QuickPic. I just tested your code snippet and the system popped up a chooser dialog to let me select the app to show the images in the folder. If I select native gallery, what I see is just an empty folder, while the Quickpic works as I want.

PS: I tell my app the Uri of the folder this way:

intent.setDataAndType(Uri.fromFile(new File("//mnt/sdcard/test/")), MimeTypeMap.getSingleton().getMimeTypeFromExtension("png"));
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!