I would like to check whether the device is supporting "Work Profile" pr not via code
Noticed that Native Support for "Work profile" from Android 5.0+ though on HTC device it is not supporting.
Could anyone share how to achieve this...
I would like to check whether the device is supporting "Work Profile" pr not via code
Noticed that Native Support for "Work profile" from Android 5.0+ though on HTC device it is not supporting.
Could anyone share how to achieve this...
Android must have the hardware feature android.software.managed_users declared. It can be checked
PackageManager pm = getPackageManager();
if (!pm.hasSystemFeature(PackageManager.FEATURE_MANAGED_USERS)) {
// This device does not support work profiles!
}
https://developer.android.com/reference/android/content/pm/PackageManager.html https://developers.google.com/android/work/build-dpc
For anyone reading this, I thought that checking FEATURE_MANAGED_USERS was sufficient, but in some devices you need to check too if there is anyone who will resolve the managed provisioning intent.