nglazkov
nglazkov

Reputation: 61

Android Multi-User behaviour: how to install application package for all users

I'm exploring the Android Multi-User behavior regarding the PackageManager. I’m trying to understand how the Packages are installed in each User and how the installation in all users can be achieved.

Could not find a way to install a package for all users, only for the current user. Testing in Android 11 emulator (AOSP) with my sample application that installs packages using PackageInstaller.

What I'm able to test:

As per my knowledge, and I'm only referring to what I've found in the official Android documentation, I couldn't find a way to programmatically install packages in all the Users. Also, I couldn't find a method to list all the packages installed in the device (not in current user, but in the device).

Now that you know my status of investigation, maybe there is someone who can help me some official statement or a workaround.

1. Is there a way to (programmatically) list all the installed packages in the device, not dependent on current user?

2. Is there a way to (programmatically) install packages for all the users and not only the current user?

Upvotes: 6

Views: 2742

Answers (0)

Related Questions