使用隐式意图读取库文件夹

时间:2018-02-28 09:49:42

标签: android android-intent photo android-implicit-intent

我正在实施一个Android应用,它会将所选文件夹中的图像同步到服务器(如Google Photo)。我希望用户通过单击按钮选择文件夹。我可以通过创建自己的视图来实现这一目标。但是,如果隐式意图可以通过任何隐式意图操作来向设备显示用户只有图像文件夹?

1 个答案:

答案 0 :(得分:0)

尝试,

 Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
        startActivityForResult(intent, 100);

相应地更改 EXTERNAL_CONTENT_URI 常量。