I suggest reading the Google documentation to create a work policy controller .
The managed application will include the constraint file declared in the manifest. An enterprise mobility partner can get this information through the Google APIs. Read Implementing Application Restrictions
The following steps can be used to find the available restrictions in the Android application:
Get apk from device. Example. Use the following steps:
$ adb shell pm path com.android.chrome package:/data/app/com.android.chrome-2/base.apk $ adb pull /data/app/com.android.chrome-2/base.apk 4722 KB/s (32575247 bytes in 6.735s)
Expand the apk file. Locate the app_restrictions.xml file in the res/ folder.
Use aapt tool to extract the contents of this file from apk. Example:
aapt d xmltree DivideProductivity_1.2_RC05_6-1.apk res/xml/app_restrictions.xml aapt d xmltree base.apk res/xml-v21/app_restrictions.xml
Please note that with this mechanism you can only view restriction keys. You will need the type of restriction and other information to actually set restrictions on the managed application. The correct way is to use the Google game API on the server.
user802467
source share