Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
此路径适用于某些设备来获取捕获图像的路径,但这不适用于所有设备,因为有些设备不包含dcim它自己的文件。所以我需要动态获取所有设备的路径有没有办法使用任何 api 来做到这一点。谢谢。
dcim
File path = Environment .getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM + "/Camera");
您可以使用 managedQuery 查询内容解析器。它将返回一个光标,您可以通过该光标访问图像/视频/声音文件。