我有两个应用程序使用相同的图像包。图像大小为 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/