简体   繁体   English

如何在 Android 中下载并打开 PDF 11 Xamarin Z6450242531912981C3683CAE8

[英]How to download and open a PDF in Android 11 Xamarin Forms

I could able to download and open that PDF using PDF reader before targeting Android 11. Now PDF download to the app specific storage location.在定位 Android 11 之前,我可以使用 PDF 阅读器下载并打开 PDF。现在 ZBCD1B68 下载到特定的应用程序存储位置 58DFC1B。 According to the new policy other third party apps have no access to that location.根据新政策,其他第三方应用程序无法访问该位置。 So how can I open and show that PDF?那么如何打开并显示 PDF? There is no specific direction to follow.没有具体的方向可以遵循。 Is there any way to open the PDF without saving it?有什么方法可以打开PDF而不保存? PDF data coming as a byte[] PDF 数据以字节形式出现[]

According to the official documentation, starting in Android 11, apps cannot create their own app-specific directory on external storage.根据官方文档,从 Android 11 开始,应用程序无法在外部存储上创建自己的应用程序特定目录。

You can no longer use the ACTION_OPEN_DOCUMENT_TREE or the ACTION_OPEN_DOCUMENT intent action to request that the user select individual files from the following directories: The Android/data/ directory and all subdirectories.您不能再使用ACTION_OPEN_DOCUMENT_TREEACTION_OPEN_DOCUMENT意图操作来请求用户 select 来自以下目录的单个文件: Android/data/目录和所有子目录。 The Android/obb/ directory and all subdirectories. Android/obb/目录和所有子目录。

You can check the path settings you are using, For more information, please see https://developer.android.com/about/versions/11/privacy/storage#file-directory-restrictions您可以检查您正在使用的路径设置,有关更多信息,请参阅https://developer.android.com/about/versions/11/privacy/storage#file-directory-restrictions

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM