我尝试使用此代码打开图库。我的应用程序在库中创建了一个目录。我可以在图库中看到我的目录。我试图通过此代码从我的应用中打开它: -
File sdDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
File f = new File(sdDir, "Photo Location Note");
Intent i = new Intent();
i.setAction(Intent.ACTION_VIEW);
i.setDataAndType(Uri.withAppendedPath(Uri.fromFile(f), "Photo Location Note"), "image/*");
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);
它打开图库并显示一个Toast消息为"无法找到项目"。它没有打开我的目录" Photo Location Note"在画廊里。
如何打开我的目录"照片位置注意"在画廊?