- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我尝试附上一些照片(或其他!文档),这些照片是通过手机相机(或其他!应用程序 - 用于创建文档)制作的。如果我运行下面的代码来选择照片,我没有看到它们:
如果我打开 android 文件资源管理器 - 照片存在:
Screenshot directly from android file explorer
其他文件夹的情况与最近的情况相同,请参阅附件屏幕:
Screenshot directly from android file explorer 2
看起来我没有足够的权限 - 但我还需要什么权限才能使用 Android Q??
如果我使用 6.0 到 9.0 之后的任何其他 Android 版本 - 那么一切都很好!我可以浏览并选择我想要的所有文件。
Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
intent.setType("*/*");
startActivityForResult(intent,requestCode);
附注DCIM\Camera 文件夹请看附件截图:
最佳答案
你试过 ACTION_GET_CONTENT
关于android - Intent.ACTION_OPEN_DOCUMENT 在 Android Q 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58282103/
在我的应用程序中,我想为用户提供一种从应用程序的数据目录中选择文件的方法。这是我的代码: // use ACTION_OPEN_DOCUMENT because ACTION_GET_CONTENT
我想在我的小米设备上使用 ACTION_OPEN_DOCUMENT。我试过 this google sample ,但它也不起作用。使用下面的代码,我可以正常运行在 Samsung galaxy s4
我正在使用此处指定的新 Kitkat 存储访问框架 (SAF): https://developer.android.com/guide/topics/providers/document-provi
我想使用作为存储访问框架的一部分提供的 android 系统对话框打开文件。我用 Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); in
我有 AddActivity,它可以让您从相机拍摄的照片或从图库中选择的图像中获取 URI。然后就可以去DetailsActivity查看图片了。在您重新启动设备之前,我现在可以正常工作。在您重新启动
我想在特定路径打开文件选择器。用户应该能够选择手机上的任何文件,但 SAF 应首先显示特定文件夹。我尝试了以下方法,但它总是打开下载文件夹。谢谢! Intent intent = new Intent
我想获取我使用 Intent.ACTION_OPEN_DOCUMENT 选择的文件的文件扩展名。如何获取? 这就是我启动选择器的方式: private void startFilePicker(){
我很难理解 ACTION_OPEN_DOCUMENT 和 ACTION_GET_CONTENT Intent 用于打开可打开文档时之间的区别。如果我在 KitKat 之前支持 Andriod,它不支持
我尝试附上一些照片(或其他!文档),这些照片是通过手机相机(或其他!应用程序 - 用于创建文档)制作的。如果我运行下面的代码来选择照片,我没有看到它们: Screenshot from the App
当我尝试使用打开 .json 文件时 startActivityForResult(Intent(Intent.ACTION_OPEN_DOCUMENT).apply { addCategor
我正在使用 ACTION_OPEN_DOCUMENT Intent 来启动系统文件选择器。用户应该选择一个“gpx”文件(blabla.gpx)。 我希望选择器只允许选择带有“.gpx”扩展名的文件。
当用户选择文件夹而不是文件时,我希望能够从 DocumentFile 访问文件列表。我这样称呼 Intent : Intent intent = new Intent(Intent.ACTION_OP
我正在使用 android pie 中的 Retrofit 制作个人资料照片更改功能。 这样我就成功的把相机拍的照片上传到服务器了。但我不知道如何将从图库中选择的照片传输到我的服务器。(我可以使用 J
我希望 SAF“在指定文档中启动导航器,如果它是一个文件夹”(他们在文档中这样调用它)。 这不起作用,所以我也想知道我是否可以将存储快捷方式添加到 SAF UI。请参阅此链接中的图片: https:/
我需要编写一个 Android 应用程序来观察另一个应用程序何时修改文件,然后从中读取数据。该文件由用户选择。所以我想使用 Intent 以及设备上可用的文件选择器供用户选择文件。 使用 Intent
我正在尝试编写一个自定义 DocumentsProvider,它允许其他应用程序对其提供的 Uris 获取持久权限 我有一个 DocumentsProvider,我在我的 AndroidManufes
在我的一个 android 项目中,我在装有 Android 5.0.2 的三星平板电脑上遇到了以下问题:从 fragment 中,用户可以开始选择一个文件: private static final
我正在使用 react-native-firebase和 react-native-document-picker我正在尝试关注 face detection tutorial . 尽管通过 Perm
我是一名优秀的程序员,十分优秀!