Search code examples
androidandroid-manifestipc

Detect applications with same sharedUserId


Is there a way to get applications having same shareUserId from a third application. I mean i wish to detect the 2 applications having same sharedUserId from my application.


Solution

  • Use PackageManager and check user Id of each of installed package. There is sharedUserId field in PackageInfo structure which will be set if package uses it.