Can multiple Android applications share a single process and application context?

后端 未结 2 741
悲哀的现实
悲哀的现实 2020-12-29 13:13

I am wondering if I could share a singleton on the application context across multiple applications? Each application would be in its own APK but This might sound like bad

2条回答
  •  情话喂你
    2020-12-29 14:04

    Yes, they can. You just need to assign same values to android:sharedUserId and android:process in both applications and sign them with same certificate.

    Related Links:

    • manifest property android:sharedUserId
    • application property: android:process
    • Processes and Threads General Description

提交回复
热议问题