android - 使用内部存储在两个应用程序之间共享文件

标签 android

我有两个应用程序使用相同的图像包。图像大小为 50 Mb。我想在两个应用程序中使用这些图像,但仅将其下载到其中一个应用程序的内部存储中。可以这样做吗? 我知道我可以通过下载 SD 卡中的图像来解决此问题,但在这种情况下我需要将其下载到内部存储中。

最佳答案

如果您拥有这两个应用程序,最简单(且安全)的解决方案可能是声明 一个sharedUserId :

If this attribute is set to the same value for two or more applications, they will all share the same ID — provided that they are also signed by the same certificate. Application with the same user ID can access each other's data and, if desired, run in the same process.

关于android - 使用内部存储在两个应用程序之间共享文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34720063/

相关文章:

java - 在android编程中,类名连接下划线是什么意思?

android - 手机文件读取性能 : internal storage vs. SD卡对比PC硬盘

java - Java中是否有等效的TweenMax

java - 如何导出vCard 3.0?

java - Android SDK 不会从 Eclipse 启动

android - 如何将我的 Activity 绑定(bind)到我当前在 Android 中运行的服务?

android - token android.os.BinderProxy@be12cf1 的应用程序有太多 Windows 20

android - 使用 sw-600dp 布局的最小屏幕尺寸是多少?

android - Android Studio 和 Pepper SDK 中的问题

android - Widget.AppCompat.Button.Colored Button 禁用时透明