缺少文档提供者使用 Intent.ActionCreateDocument

Missing Document Providers using Intent.ActionCreateDocument

当我使用 Intent.ActionOpenDocument 作为 activity 时,生成的选择器会显示所有可用的文档提供程序。当我使用 Intent.ActionCreateDocument 时,结果选择器显示了有限的文档提供者子集。有谁知道让 Intent.ActionCreateDocument 选择器显示所有文档提供者的方法吗?

安装 OneDrive 应用程序后,它支持 ACTION_OPEN_DOCUMENT Intent (Android Storage Access Framework (SAF)),但不幸的是它不支持来自相同 SAFACTION_CREATE_DOCUMENT Intent。因此我们可以实施 work-around:第一次调用 ACTION_SEND 和后者 ACTION_OPEN_DOCUMENT.

但是 与使用 Google Drive(支持打开和创建意图)进行相同操作相比,这意味着最终用户在与 OneDrive 交互时的用户体验较差。因此,用户需要 select 使用 OneDrive 文件两次,如果他使用 GDrive 则只需要一次。