0

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?

1 Answers1

0

android:sharedUserId - This is deprecated now, you should avoid using this

when should we use applications in the shared process

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

how can we access data on other application in that process

You can use Android Interface Definition Language (AIDL) for this https://developer.android.com/guide/components/aidl

Sidakpreet N
  • 137
  • 1
  • 1
  • 10
  • I know separating process of components in an application, but what about two applications using same process? is any other solution except using AIDL? – muhammad arbabi Jul 05 '22 at 06:31
  • Can you please elaborate your use-case of using same process for two apps? – Sidakpreet N Jul 05 '22 at 06:46
  • According to the Android documents [link](https://developer.android.com/guide/topics/manifest/application-element) By setting this attribute to a process name that's shared with another application, you can arrange for components of both applications to run in the same process — but only if the two applications also share a user ID and are signed with the same certificate. – muhammad arbabi Jul 05 '22 at 07:15
  • So I can not understand how can two application in the same process, communicate with each other? – muhammad arbabi Jul 05 '22 at 07:20