简体   繁体   English

如何在外部应用程序 android 中打开存储在应用程序特定存储中的文件?

[英]How open file stored in app specific storage in external app android?

I have stored files like pdf and ppt in app-specific storage.我已将 pdf 和 ppt 等文件存储在特定于应用程序的存储中。 And now I want to open these files on an external app.现在我想在外部应用程序上打开这些文件。

When I tried to open the file using the Intent I am getting an exception: exposed beyond app through ClipData.Item.getUri()当我尝试使用 Intent 打开文件时出现异常:通过 ClipData.Item.getUri() 暴露在应用程序之外

How can I do that?我怎样才能做到这一点?

Thanks In advance:)提前致谢:)

Since I am not able to see the code through which you are trying to open the file from external app, all i can suggest is please save your app specific data in a shared storage of external directories as suggested by Android docs.由于我无法看到您尝试从外部应用程序打开文件的代码,因此我只能建议将您的应用程序特定数据保存在外部目录的共享存储中,如 Android 文档所建议的那样。

I would recommend this Save data to app specific location我会推荐这个Save data to app specific location

and Save data to shared storage并将数据保存到共享存储

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

相关问题 在外部存储中写入文件会使Android应用程序崩溃 - Writing file in external storage crashes android app Android Studio从应用程序打开外部文件 - Android studio open external file from app Android 13 在外部存储中创建应用程序特定文件夹 - Android 13 create a app specific folder in External Storage 如何在Android上将文件从内部应用程序存储移动/重命名为外部存储? - How to move/rename file from internal app storage to external storage on Android? 如何从Android上的外部存储打开.gif文件作为InputStream - How to open .gif file as InputStream from external storage on android 如何从应用程序打开外部存储中的文件? (Android) - How to open a file in external storage from an application? (Android) 如何从 firebase 存储链接在我的应用程序(android studio,JAVA)中打开 pdf 文件 - How to open pdf file inside my app (android studio, JAVA) from firebase storage link 在Android App中下载到RAM而不是外部存储 - Downloading to RAM instead of External Storage in Android App 我可以使用直接文件路径来访问存储在应用程序特定存储中的文件吗? - Can I use direct file paths to access files stored in app specific storage? 如何使用 android studio 删除 android 应用程序中的内部存储文件? - How to delete internal storage file in android app using android studio?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM