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

标签 android authentication sharing data-sharing

我在 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/

相关文章:

android - URL 连接关闭有时会挂起

java - 更新 TabLayout 中的 TextView 导致 NullPointerException

android - 我可以通过 android 中的 findViewById() 方法直接访问包含布局的 child 吗?

android - picasso 居中图像而不调整大小到 ImageView

php - 使用Javascript XmlHttpRequest和PHP保护Web服务调用的安全

javascript - Passport 认证唯一 session ID概念

php - 如何使用纯 HTTP 身份验证和 PHP 在 Apache 下获取经过身份验证的用户名?

Android问题文本和图像,标签共享使用facebook sdk

node.js - 在多个文件 node.js 之间共享和修改变量

macos - 使用 NSSharingService 定义邮件主题