When I run my app from Android Studio and install it on the primary user on a device, I notice that it gets installed on the secondary user as well.
In the first place, why is this happening? The android:requiredForAllUsers
flag is false
by default, and in any case can only be used by system apps or pre-installed apps.
Or is it the case that this happens only for debug-mode apps installed via Android Studio?
How can I prevent this from happening?
It is critical for my app that it be installed on one user only. I have already read the following documents:
Neither of those documents has any explanation of whether and how the installation process is affected by the multi-user feature.
There must surely be some manifest or build setting that permits or prevents installation on multiple users. Why isn't it easier to find? And why isn't this question more common on SO?