Two android applications with same sharedUserId and process

112 Views Asked by At

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

There are 1 best solutions below

4
Sidakpreet N On

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