两个应用程序之间共享文件/安装目录 [英] Sharing files/ installation directory between two apps

查看:270
本文介绍了两个应用程序之间共享文件/安装目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Android的两个应用程序这就需要在它们之间共享一些文件。现在,我通过一台FTP服务器共享文件。

I have two apps on Android which need to share few files among them. Right now I share files via a ftp server.

有没有一种方法,我可以验证这些应用给对方,让他们可以看看到每个人的?安装目录

Is there a way I can authenticate these apps to each other so that they can look into each others installed directory?

感谢您。
AAT

Thank you. AAT

推荐答案

您需要设置的安卓sharedUserId 清单中为应用程序和使用相同的证书他们签名:

You need to set android:sharedUserId in manifest for both apps and sign them with the same certificate:

这将与其他应用程序共享一个Linux用户ID的名称。默认情况下,Android的分配每个应用程序自己独特的用户ID。但是,如果该属性被设置为两个或更多的应用程序相同的值,它们将共享相同的ID - 条件是它们也由相同的证书进行签名。用相同的用户ID的应用程序可以访问彼此的数据,并且如果需要的话,在同一进程中运行。

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.

这篇关于两个应用程序之间共享文件/安装目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆