两个具有相同共享和流程的Android应用程序
我有一个有关具有相同Android的Android应用程序的疑问:SharedUserid和Android:Process属性。
您能告诉我,我们什么时候应该在共享过程中使用应用程序,如何在该过程中访问其他应用程序上的数据?
I've got a question about android applications with same android:sharedUserId and android:process attributes.
would you please tell me, when should we use applications in the shared process and how can we access data on other application in that process?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
android:shareduserid - 现在已经弃用了,您应该避免使用此功能
理想的整个应用程序过程不应与其他应用程序共享,并且也不会有太多用例
应该制作诸如活动/接收器等的Android组件在单独的过程中运行,而不是申请过程基础,例如我们使用单独的过程来运行FCM服务以减少内存足迹,同时初始化ANR的初始化
您可以使用Android接口定义语言(AIDL)
https://developer.android.com/guide/components/components/aidl
android:sharedUserId - This is deprecated now, you should avoid using this
Ideally whole application process should not be shared with another application and there won't be much use-cases of it as well
Android components such as Activity/Receiver etc should be made to run in a separate process as opposed to application process basis some use-case, like we used separate process for running our FCM service to reduce memory footprints while initialising reducing our ANR's
You can use Android Interface Definition Language (AIDL) for this
https://developer.android.com/guide/components/aidl