gpt4 book ai didi

android - 在两个应用程序之间共享文件/安装目录

转载 作者:行者123 更新时间:2023-11-29 02:01:25 25 4
gpt4 key购买 nike

我在 Android 上有两个应用程序需要在它们之间共享几个文件。现在我通过 ftp 服务器共享文件。

有没有一种方法可以让这些应用相互验证,以便它们可以查看彼此的安装目录?

谢谢。亚特兰大

最佳答案

你需要设置android:sharedUserId在两个应用程序的 list 中并使用相同的证书对它们进行签名:

The name of a Linux user ID that will be shared with other applications. By default, Android assigns each application its own unique user ID. However, 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/12530972/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com