访问Android中图库的特定文件夹
我想打开图库的特定文件夹。我知道打开图库并从中选择任何图像的代码。但我只想打开默认图库中的文件夹。 还有另一种方法可以手动访问该图像并通过在活动中创建图库来显示它。但我想默认打开。
我试过这个。但显然不起作用。
Intent intent = new Intent();
intent.setType("image/myFolder/*");
intent.setAction(Intent.ACTION_VIEW);
startActivity(Intent.createChooser(intent,
"Select Picture"));
有人可以帮忙吗?
提前致谢
I want to open specific folder of gallery. I know the code to open gallery and choose any image from that. But i want to just open folder in a default gallery.
There is another way to manually access that images and show it by vreating gallery in activity. But i want to open in default.
i tried this one. But obviously not working.
Intent intent = new Intent();
intent.setType("image/myFolder/*");
intent.setAction(Intent.ACTION_VIEW);
startActivity(Intent.createChooser(intent,
"Select Picture"));
Anyone can help?
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这可能对某人有帮助......
因为我已经找到了解决我的问题的方法。
m_list 包含folder_name 下的所有文件。
干杯!!
I think it may help somebody...
As i have found solution to my problem.
m_list contains all the files under folder_name.
Cheers!!