Android 5.0 (API level 21) allows enterprises to set up managed profiles. If a device has a managed profile, the profile's settings are under the control of the enterprise administrator. The administrator can choose which apps are allowed for that profile, and can control just what device features are available to the profile.
Suppose we have an application in Google Play Market and also some of the customers are able to install the application via Mobile Device Management Profile. How to distinguish programmatically between those application versions? In other words, how to ensure that specific application version is managed by enterprise administrator (located under work profile) ? Thanks in advance.
You can try something like:
final UserManager um = (UserManager) getSystemService(Context.USER_SERVICE);
if (um.hasUserRestriction("WORK_PROFILE_RESTRICTION")) {
System.out.print("it is work profile");
} else {
System.out.print("it isn't work profile");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With