How do you make two Android apps with a common user id?

I remember reading somewhere that you can force two Android applications to use the same user ID, but I heard conflicting information from other people. Is it possible for two applications to have the same user ID, and if so, how to do this?

+3
source share
2 answers

It looks like you can use the sharedUserId attribute . These two applications must also be signed with the same signature.

+3
source

sharedUserId ( ), , :

Context ctx = createPackageContext("com.yourcompany.youapp", CONTEXT_RESTRICTED);
FileInputStream fis = ctx.openFileInput("sharedFile.txt");
+3

Source: https://habr.com/ru/post/1752525/


All Articles