EMM Policy APIs allow thirdparty system get reseller EMM policy, create reseller EMM policy, get merchant EMM policy, create merchant EMM policy.
All the EMM policy APIs are in the class com.pax.market.api.sdk.java.api.emm.emmPolicy.EmmPolicyApi.
Constructors of EmmPolicyApi
public EmmPolicyApi(String baseUrl, String apiKey, String apiSecret);
Constructor parameters description
Name | Type | Description |
---|---|---|
baseUrl | String | the base url of REST API |
apiKey | String | the apiKey of marketplace, get this key from PAXSTORE admin console, refer to chapter Apply access rights |
apiSecret | String | apiSecret, get api secret from PAXSTORE admin console, refer to chapter Apply access rights |
The get reseller EMM policy API allows thirdparty system get reseller EMM policy.
API
public Result<EmmPolicyDTO> getResellerEmmPolicy(String resellerName);
Input parameter(s) description
Name | Type | Nullable | Description |
---|---|---|---|
resellerName | String | false | get EMM policy under the reseller |
Sample codes
EmmAppApi emmAppApi = new EmmAppApi("https://api.whatspos.com/p-market-api", "RCA9MDH6YN3WSSGPW6TJ", "TUNLDZVZECHNKZ4FW07XFCKN2W0N8ZDEA5ENKZYN");
Result<EmmPolicyDTO> result = emmPolicyApi.getResellerEmmPolicy("PAX");
Client side validation failed sample result(JSON formatted)
{
"businessCode": -1,
"validationErrors": ["Parameter resellerName cannot be null!"]
}
Server side validation failed sample result(JSON formatted)
{
"businessCode": 1759,
"message": "Reseller doesn't exist"
}
Successful sample result
{
"businessCode": 0,
"data": {
"customPolicyCount": 4,
"name": "PAX",
"contentInfo": {
"adjustVolumeDisabled": true,
"advancedSecurityOverrides": {
"developerSettings": "DEVELOPER_SETTINGS_ALLOWED",
"googlePlayProtectVerifyApps": "VERIFY_APPS_ENFORCED",
"untrustedAppsPolicy": "ALLOW_INSTALL_IN_PERSONAL_PROFILE_ONLY"
},
"alwaysOnVpnPackage": {
"lockdownEnabled": true,
"packageName": "com.test"
},
"appAutoUpdatePolicy": "NEVER",
"autoDateAndTimeZone": "AUTO_DATE_AND_TIME_ZONE_ENFORCED",
"bluetoothDisabled": true,
"cameraAccess": "CAMERA_ACCESS_DISABLED",
"cellBroadcastsConfigDisabled": true,
"dataRoamingDisabled": true,
"deviceRadioState": {
"airplaneModeState": "AIRPLANE_MODE_DISABLED",
"minimumWifiSecurityLevel": "PERSONAL_NETWORK_SECURITY"
},
"encryptionPolicy": "ENABLED_WITHOUT_PASSWORD",
"factoryResetDisabled": true,
"funDisabled": true,
"installAppsDisabled": true,
"keyguardDisabledFeatures": [
"NOTIFICATIONS",
"UNREDACTED_NOTIFICATIONS",
"TRUST_AGENTS",
"DISABLE_FINGERPRINT",
"FACE",
"BIOMETRICS",
"SHORTCUTS",
"ALL_FEATURES"
],
"locationMode": "LOCATION_DISABLED",
"maximumTimeToLock": 15000,
"microphoneAccess": "MICROPHONE_ACCESS_DISABLED",
"minimumApiLevel": 1,
"mobileNetworksConfigDisabled": true,
"mountPhysicalMediaDisabled": true,
"networkEscapeHatchEnabled": true,
"networkResetDisabled": true,
"networkConfigurations": [
{
"ssid": "test",
"cipherType": "WEP",
"password": "1111111111",
"proxyType": "MANUAL",
"hostName": "https://www.test",
"port": 50
}
],
"outgoingCallsDisabled": true,
"passwordPolicies": {
"maximumFailedPasswordsForWipe": 1,
"passwordExpirationTimeout": "1s",
"passwordHistoryLength": 1,
"passwordMinimumLetters": 1,
"passwordMinimumLowerCase": 1,
"passwordMinimumNumeric": 1,
"passwordMinimumSymbols": 1,
"passwordMinimumUpperCase": 1,
"passwordQuality": "COMPLEX",
"requirePasswordUnlock": "REQUIRE_EVERY_DAY"
},
"permissionGrants": [
{
"permission": "android.permission-group.CALENDAR",
"policy": "PROMPT"
}
],
"permittedAccessibilityServices": {
"packageNames": [
"com.test"
]
},
"permittedInputMethods": {
"packageNames": [
"com.test"
]
},
"playStoreMode": "BLACKLIST",
"printingPolicy": "PRINTING_DISALLOWED",
"screenCaptureDisabled": true,
"setWallpaperDisabled": true,
"shareLocationDisabled": true,
"smsDisabled": true,
"stayOnPluggedModes": [
"USB"
],
"systemUpdate": {
"freezePeriods": [
{
"startDate": {
"month": 12,
"day": 3
},
"endDate": {
"month": 12,
"day": 14
}
}
],
"type": "AUTOMATIC"
},
"uninstallAppsDisabled": true,
"vpnConfigDisabled": true,
"deviceConnectivityManagement": {
"tetheringSettings": "DISALLOW_WIFI_TETHERING",
"usbDataAccess": "DISALLOW_USB_FILE_TRANSFER"
},
"deviceOwnerLockScreenInfo": "test",
"policyEnforcementRules": [
{
"blockAction": {
"blockAfterDays": 1
},
"settingName": "PASSWORD_POLICIES",
"wipeAction": {
"preserveFrp": true,
"wipeAfterDays": 2
}
}
],
"applications": [
{
"appId": 1646714366722087,
"packageName": "com.paperpile",
"autoUpdateMode": "AUTO_UPDATE_DEFAULT",
"defaultPermissionPolicy": "PROMPT",
"installPriority": "DEFAULT",
"installType": "AVAILABLE",
"lockFlag": false
}
]
},
"inheritFlag": false
}
}
The type in data is EmmPolicyDTO. The structure like below.
Property Name | Type | Description |
---|---|---|
customPolicyCount | Long | The count of EMM custom policy |
name | String | The name of EMM policy |
contentInfo | PolicyContentDTO | The content of EMM policy |
inheritFlag | Boolean | Whether inherit EMM policy |
Structure of class PolicyContentDTO
Property Name | Type | Description |
---|---|---|
adjustVolumeDisabled | Boolean | Whether adjusting the master volume is disabled. Also mutes the device |
advancedSecurityOverrides | AdvancedSecurityOverrides | Advanced security settings. In most cases, setting these is not needed |
alwaysOnVpnPackage | AlwaysOnVpnPackage | Configuration for an always-on VPN connection |
appAutoUpdatePolicy | String | Recommended alternative: autoUpdateMode which is set per app, provides greater flexibility around update frequency, value can be one of CHOICE_TO_THE_USER, NEVER, WIFI_ONLY, ALWAYS |
autoDateAndTimeZone | String | Whether auto date, time, and time zone are enabled on a company-owned device, value can be one of AUTO_DATE_AND_TIME_ZONE_USER_CHOICE, AUTO_DATE_AND_TIME_ZONE_ENFORCED |
bluetoothDisabled | Boolean | Whether bluetooth is disabled |
cameraAccess | String | Controls the use of the camera and whether the user has access to the camera access toggle, value can be one of CAMERA_ACCESS_USER_CHOICE, CAMERA_ACCESS_DISABLED, CAMERA_ACCESS_ENFORCED |
cellBroadcastsConfigDisabled | Boolean | Whether configuring cell broadcast is disabled |
dataRoamingDisabled | Boolean | Whether roaming data services are disabled |
deviceRadioState | DeviceRadioState | Covers controls for radio state such as Wi-Fi, bluetooth, and more |
encryptionPolicy | String | Whether encryption is enabled, value can be one of ENCRYPTION_POLICY_UNSPECIFIED, ENABLED_WITHOUT_PASSWORD, ENABLED_WITH_PASSWORD |
factoryResetDisabled | Boolean | Whether factory resetting from settings is disabled |
funDisabled | Boolean | Whether the user is allowed to have fun. Controls whether the Easter egg game in Settings is disabled |
installAppsDisabled | Boolean | Whether user installation of apps is disabled |
keyguardDisabledFeatures | List<String> | Disabled keyguard customizations, keyguardDisabledFeatures content can be any value of NOTIFICATIONS, UNREDACTED_NOTIFICATIONS, TRUST_AGENTS, DISABLE_FINGERPRINT, FACE, BIOMETRICS, SHORTCUTS, ALL_FEATURES |
locationMode | String | The degree of location detection enabled, value can be one of LOCATION_USER_CHOICE, LOCATION_ENFORCED, LOCATION_DISABLED |
maximumTimeToLock | Long | Maximum time in milliseconds for user activity until the device locks. A value of 0 means there is no restriction, value can be one of 0, 15000, 30000, 60000, 120000, 300000, 600000, 1800000 |
microphoneAccess | String | Controls the use of the microphone and whether the user has access to the microphone access toggle. This applies only on fully managed devices, value can be one of MICROPHONE_ACCESS_USER_CHOICE, MICROPHONE_ACCESS_DISABLED, MICROPHONE_ACCESS_ENFORCED |
minimumApiLevel | Integer | The minimum allowed Android API level |
mobileNetworksConfigDisabled | Boolean | Whether configuring mobile networks is disabled |
mountPhysicalMediaDisabled | Boolean | Whether the user mounting physical external media is disabled |
networkEscapeHatchEnabled | Boolean | Whether the user mounting physical external media is disabled |
networkResetDisabled | Boolean | Whether resetting network settings is disabled |
networkConfigurations | List<NetworkConfiguration> | Network configuration for the device |
outgoingCallsDisabled | Boolean | Whether outgoing calls are disabled |
passwordPolicies | PasswordRequirements | Password requirement policies. Different policies can be set for work profile or fully managed devices by setting the passwordScope field in the policy |
permissionGrants | List<PermissionGrant> | Explicit permission or group grants or denials for all apps |
permittedAccessibilityServices | PackageNameList | Specifies permitted accessibility services. If the field is not set, any accessibility service can be used. If the field is set, only the accessibility services in this list and the system's built-in accessibility service can be used. In particular, if the field is set to empty, only the system's built-in accessibility servicess can be used. This can be set on fully managed devices and on work profiles. When applied to a work profile, this affects both the personal profile and the work profile |
permittedInputMethods | PackageNameList | If present, only the input methods provided by packages in this list are permitted. If this field is present, but the list is empty, then only system input methods are permitted |
playStoreMode | String | This mode controls which apps are available to the user in the Play Store and the behavior on the device when apps are removed from the policy, value can be one of WHITELIST, BLACKLIST |
printingPolicy | String | Optional. Controls whether printing is allowed. This is supported on devices running Android 9 and above, value is PRINTING_DISALLOWED |
screenCaptureDisabled | Boolean | Whether screen capture is disabled |
setWallpaperDisabled | Boolean | Whether changing the wallpaper is disabled |
shareLocationDisabled | Boolean | Whether location sharing is disabled. shareLocationDisabled is supported for both fully managed devices and personally owned work profiles |
smsDisabled | Boolean | Whether sending and receiving SMS messages is disabled |
stayOnPluggedModes | List<String> | The battery plugged in modes for which the device stays on. When using this setting, it is recommended to clear maximumTimeToLock so that the device doesn't lock itself while it stays on, stayOnPluggedModes content can be any value of AC, USB, WIRELESS |
systemUpdate | SystemUpdate | The system update policy, which controls how OS updates are applied. If the update type is WINDOWED, the update window will automatically apply to Play app updates as well. Note: Google Play system updates (also called Mainline updates) are automatically downloaded and require a device reboot to be installed. Refer to the mainline section in Manage system updates for further details |
uninstallAppsDisabled | Boolean | Whether user uninstallation of applications is disabled. This prevents apps from being uninstalled, even those removed using applications |
vpnConfigDisabled | Boolean | Whether configuring VPN is disabled |
deviceConnectivityManagement | DeviceConnectivityManagement | Covers controls for device connectivity such as Wi-Fi, USB data access, keyboard/mouse connections, and more |
deviceOwnerLockScreenInfo | String | The device owner information to be shown on the lock screen |
policyEnforcementRules | List<PolicyEnforcementRule> | Rules that define the behavior when a particular policy can not be applied on device |
applications | List<ApplicationPolicy> | Policy applied to apps. This can have at most 100 elements |
Structure of class AdvancedSecurityOverrides
Property Name | Type | Description |
---|---|---|
developerSettings | String | Controls access to developer settings: developer options and safe boot, value can be one of DEVELOPER_SETTINGS_DISABLED, DEVELOPER_SETTINGS_ALLOWED |
googlePlayProtectVerifyApps | String | Whether Google Play Protect verification is enforced, value can be one of VERIFY_APPS_USER_CHOICE, VERIFY_APPS_ENFORCED |
untrustedAppsPolicy | String | The policy for untrusted apps (apps from unknown sources) enforced on the device, value can be one of DISALLOW_INSTALL, ALLOW_INSTALL_IN_PERSONAL_PROFILE_ONLY, ALLOW_INSTALL_DEVICE_WIDE |
Structure of class AlwaysOnVpnPackage
Property Name | Type | Description |
---|---|---|
lockdownEnabled | Boolean | Disallows networking when the VPN is not connected |
packageName | String | The package name of the VPN app |
Structure of class DeviceRadioState
Property Name | Type | Description |
---|---|---|
airplaneModeState | String | Controls whether airplane mode can be toggled by the user or not, value is AIRPLANE_MODE_DISABLED |
minimumWifiSecurityLevel | String | The minimum required security level of Wi-Fi networks that the device can connect to, value can be one of OPEN_NETWORK_SECURITY, PERSONAL_NETWORK_SECURITY, ENTERPRISE_NETWORK_SECURITY, ENTERPRISE_BIT192_NETWORK_SECURITY |
Structure of class NetworkConfiguration
Property Name | Type | Description |
---|---|---|
ssid | String | Wi-Fi SSID |
cipherType | String | Wi-Fi cipher type, value can be one of NONE, WEP, WPA_WPA2_PSK |
password | String | Wi-Fi password, for WEP password |
proxyType | String | Wi-Fi proxy type, value can be one of NONE, MANUAL, PAC |
hostName | String | Wi-Fi proxy host name |
port | Integer | Wi-Fi proxy port |
pacUrl | String | WIFI pac url |
Structure of class PasswordRequirements
Property Name | Type | Description |
---|---|---|
maximumFailedPasswordsForWipe | Integer | Number of incorrect device-unlock passwords that can be entered before a device is wiped. A value of 0 means there is no restriction |
passwordExpirationTimeout | String | Password expiration timeout. A duration in seconds with up to nine fractional digits, ending with 's' |
passwordHistoryLength | Integer | The length of the password history. After setting this field, the user won't be able to enter a new password that is the same as any password in the history. A value of 0 means there is no restriction |
passwordMinimumLength | Integer | The minimum allowed password length. A value of 0 means there is no restriction. Only enforced when passwordQuality is NUMERIC_COMPLEX, ALPHABETIC, ALPHANUMERIC, or COMPLEX |
passwordMinimumLetters | Integer | Minimum number of letters required in the password. Only enforced when passwordQuality is COMPLEX |
passwordMinimumLowerCase | Integer | Minimum number of lower case letters required in the password. Only enforced when passwordQuality is COMPLEX |
passwordMinimumNumeric | Integer | Minimum number of numerical digits required in the password. Only enforced when passwordQuality is COMPLEX |
passwordMinimumSymbols | Integer | Minimum number of symbols required in the password. Only enforced when passwordQuality is COMPLEX |
passwordMinimumUpperCase | Integer | Minimum number of upper case letters required in the password. Only enforced when passwordQuality is COMPLEX |
passwordQuality | String | The required password quality, value can be one of PASSWORD_QUALITY_UNSPECIFIED, SOMETHING, NUMERIC_COMPLEX, ALPHABETIC, ALPHANUMERIC, COMPLEX |
requirePasswordUnlock | String | The length of time after a device or work profile is unlocked using a strong form of authentication (password, PIN, pattern) that it can be unlocked using any other authentication method (e.g. fingerprint, trust agents, face). After the specified time period elapses, only strong forms of authentication can be used to unlock the device or work profile, value can be one of USE_DEFAULT_DEVICE_TIMEOUT, REQUIRE_EVERY_DAY |
Structure of class PermissionGrant
Property Name | Type | Description |
---|---|---|
permission | String | The Android permission or group, value can be one of android.permission-group.ACTIVITY_RECOGNITION, android.permission-group.CALENDAR, android.permission-group.CALL_LOG, android.permission-group.CAMERA, android.permission-group.CONTACTS, android.permission-group.LOCATION, android.permission-group.MICROPHONE, android.permission-group.NEARBY_DEVICES, android.permission-group.NOTIFICATIONS, android.permission-group.PHONE, android.permission-group.READ_MEDIA_AURAL, android.permission-group.READ_MEDIA_VISUAL, android.permission-group.SENSORS, android.permission-group.SMS, android.permission-group.STORAGE, android.permission.ACCEPT_HANDOVER, android.permission.ACCESS_BACKGROUND_LOCATION, android.permission.ACCESS_BLOBS_ACROSS_USERS, android.permission.ACCESS_CHECKIN_PROPERTIES, android.permission.ACCESS_COARSE_LOCATION, android.permission.ACCESS_FINE_LOCATION, android.permission.ACCESS_HIDDEN_PROFILES, android.permission.ACCESS_LOCATION_EXTRA_COMMANDS, android.permission.ACCESS_MEDIA_LOCATION, android.permission.ACCESS_NETWORK_STATE, android.permission.ACCESS_NOTIFICATION_POLICY, android.permission.ACCESS_WIFI_STATE, android.permission.ACCOUNT_MANAGER, android.permission.ACTIVITY_RECOGNITION, com.android.voicemail.permission.ADD_VOICEMAIL, android.permission.ANSWER_PHONE_CALLS, android.permission.BATTERY_STATS, android.permission.BIND_ACCESSIBILITY_SERVICE, android.permission.BIND_APPWIDGET, android.permission.BIND_AUTOFILL_SERVICE, android.permission.BIND_CALL_REDIRECTION_SERVICE, android.permission.BIND_CARRIER_MESSAGING_CLIENT_SERVICE, android.permission.BIND_CARRIER_MESSAGING_SERVICE, android.permission.BIND_CARRIER_SERVICES, android.permission.BIND_CHOOSER_TARGET_SERVICE, android.permission.BIND_COMPANION_DEVICE_SERVICE, android.permission.BIND_CONDITION_PROVIDER_SERVICE, android.permission.BIND_CONTROLS, android.permission.BIND_CREDENTIAL_PROVIDER_SERVICE, android.permission.BIND_DEVICE_ADMIN, android.permission.BIND_DREAM_SERVICE, android.permission.BIND_INCALL_SERVICE, android.permission.BIND_INPUT_METHOD, android.permission.BIND_MIDI_DEVICE_SERVICE, android.permission.BIND_NFC_SERVICE, android.permission.BIND_NOTIFICATION_LISTENER_SERVICE, android.permission.BIND_PRINT_SERVICE, android.permission.BIND_QUICK_ACCESS_WALLET_SERVICE, android.permission.BIND_QUICK_SETTINGS_TILE, android.permission.BIND_REMOTEVIEWS, android.permission.BIND_SCREENING_SERVICE, android.permission.BIND_TELECOM_CONNECTION_SERVICE, android.permission.BIND_TEXT_SERVICE, android.permission.BIND_TV_INPUT, android.permission.BIND_TV_INTERACTIVE_APP, android.permission.BIND_VISUAL_VOICEMAIL_SERVICE, android.permission.BIND_VOICE_INTERACTION, android.permission.BIND_VPN_SERVICE, android.permission.BIND_VR_LISTENER_SERVICE, android.permission.BIND_WALLPAPER, android.permission.BLUETOOTH, android.permission.BLUETOOTH_ADMIN, android.permission.BLUETOOTH_ADVERTISE, android.permission.BLUETOOTH_CONNECT, android.permission.BLUETOOTH_PRIVILEGED, android.permission.BLUETOOTH_SCAN, android.permission.BODY_SENSORS, android.permission.BODY_SENSORS_BACKGROUND, android.permission.BROADCAST_PACKAGE_REMOVED, android.permission.BROADCAST_SMS, android.permission.BROADCAST_STICKY, android.permission.BROADCAST_WAP_PUSH, android.permission.CALL_COMPANION_APP, android.permission.CALL_PHONE, android.permission.CALL_PRIVILEGED, android.permission.CAMERA, android.permission.CAPTURE_AUDIO_OUTPUT, android.permission.CHANGE_COMPONENT_ENABLED_STATE, android.permission.CHANGE_CONFIGURATION, android.permission.CHANGE_NETWORK_STATE, android.permission.CHANGE_WIFI_MULTICAST_STATE, android.permission.CHANGE_WIFI_STATE, android.permission.CLEAR_APP_CACHE, android.permission.CONFIGURE_WIFI_DISPLAY, android.permission.CONTROL_LOCATION_UPDATES, android.permission.CREDENTIAL_MANAGER_QUERY_CANDIDATE_CREDENTIALS, android.permission.CREDENTIAL_MANAGER_SET_ALLOWED_PROVIDERS, android.permission.CREDENTIAL_MANAGER_SET_ORIGIN, android.permission.DELETE_CACHE_FILES, android.permission.DELETE_PACKAGES, android.permission.DELIVER_COMPANION_MESSAGES, android.permission.DETECT_SCREEN_CAPTURE, android.permission.DETECT_SCREEN_RECORDING, android.permission.DIAGNOSTIC, android.permission.DISABLE_KEYGUARD, android.permission.DUMP, android.permission.ENFORCE_UPDATE_OWNERSHIP, android.permission.EXECUTE_APP_ACTION, android.permission.EXPAND_STATUS_BAR, android.permission.FACTORY_TEST, android.permission.FOREGROUND_SERVICE, android.permission.FOREGROUND_SERVICE_CAMERA, android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE, android.permission.FOREGROUND_SERVICE_DATA_SYNC, android.permission.FOREGROUND_SERVICE_HEALTH, android.permission.FOREGROUND_SERVICE_LOCATION, android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK, android.permission.FOREGROUND_SERVICE_MEDIA_PROCESSING, android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION, android.permission.FOREGROUND_SERVICE_MICROPHONE, android.permission.FOREGROUND_SERVICE_PHONE_CALL, android.permission.FOREGROUND_SERVICE_REMOTE_MESSAGING, android.permission.FOREGROUND_SERVICE_SPECIAL_USE, android.permission.FOREGROUND_SERVICE_SYSTEM_EXEMPTED, android.permission.GET_ACCOUNTS, android.permission.GET_ACCOUNTS_PRIVILEGED, android.permission.GET_PACKAGE_SIZE, android.permission.GET_TASKS, android.permission.GLOBAL_SEARCH, android.permission.HIDE_OVERLAY_WINDOWS, android.permission.HIGH_SAMPLING_RATE_SENSORS, android.permission.INSTALL_LOCATION_PROVIDER, android.permission.INSTALL_PACKAGES, com.android.launcher.permission.INSTALL_SHORTCUT, android.permission.INSTANT_APP_FOREGROUND_SERVICE, android.permission.INTERACT_ACROSS_PROFILES, android.permission.INTERNET, android.permission.KILL_BACKGROUND_PROCESSES, android.permission.LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE, android.permission.LAUNCH_MULTI_PANE_SETTINGS_DEEP_LINK, android.permission.LOADER_USAGE_STATS, android.permission.LOCATION_HARDWARE, android.permission.MANAGE_DEVICE_LOCK_STATE, android.permission.MANAGE_DOCUMENTS, android.permission.MANAGE_EXTERNAL_STORAGE, android.permission.MANAGE_MEDIA, android.permission.MANAGE_ONGOING_CALLS, android.permission.MANAGE_OWN_CALLS, android.permission.MANAGE_WIFI_INTERFACES, android.permission.MANAGE_WIFI_NETWORK_SELECTION, android.permission.MASTER_CLEAR, android.permission.MEDIA_CONTENT_CONTROL, android.permission.MEDIA_ROUTING_CONTROL, android.permission.MODIFY_AUDIO_SETTINGS, android.permission.MODIFY_PHONE_STATE, android.permission.MOUNT_FORMAT_FILESYSTEMS, android.permission.MOUNT_UNMOUNT_FILESYSTEMS, android.permission.NEARBY_WIFI_DEVICES, android.permission.NFC, android.permission.NFC_PREFERRED_PAYMENT_INFO, android.permission.NFC_TRANSACTION_EVENT, android.permission.OVERRIDE_WIFI_CONFIG, android.permission.PACKAGE_USAGE_STATS, android.permission.PERSISTENT_ACTIVITY, android.permission.POST_NOTIFICATIONS, android.permission.PROCESS_OUTGOING_CALLS, android.permission.PROVIDE_OWN_AUTOFILL_SUGGESTIONS, android.permission.PROVIDE_REMOTE_CREDENTIALS, android.permission.QUERY_ALL_PACKAGES, android.permission.READ_ASSISTANT_APP_SEARCH_DATA, android.permission.READ_BASIC_PHONE_STATE, android.permission.READ_CALENDAR, android.permission.READ_CALL_LOG, android.permission.READ_CONTACTS, android.permission.READ_DROPBOX_DATA, android.permission.READ_EXTERNAL_STORAGE, android.permission.READ_HOME_APP_SEARCH_DATA, android.permission.READ_LOGS, android.permission.READ_MEDIA_AUDIO, android.permission.READ_MEDIA_IMAGES, android.permission.READ_MEDIA_VIDEO, android.permission.READ_MEDIA_VISUAL_USER_SELECTED, android.permission.READ_NEARBY_STREAMING_POLICY, android.permission.READ_PHONE_NUMBERS, android.permission.READ_PHONE_STATE, android.permission.READ_PRECISE_PHONE_STATE, android.permission.READ_SMS, android.permission.READ_SYNC_SETTINGS, android.permission.READ_SYNC_STATS, com.android.voicemail.permission.READ_VOICEMAIL, android.permission.REBOOT, android.permission.RECEIVE_BOOT_COMPLETED, android.permission.RECEIVE_MMS, android.permission.RECEIVE_SMS, android.permission.RECEIVE_WAP_PUSH, android.permission.RECORD_AUDIO, android.permission.REORDER_TASKS, android.permission.REQUEST_COMPANION_PROFILE_APP_STREAMING, android.permission.REQUEST_COMPANION_PROFILE_AUTOMOTIVE_PROJECTION, android.permission.REQUEST_COMPANION_PROFILE_COMPUTER, android.permission.REQUEST_COMPANION_PROFILE_GLASSES, android.permission.REQUEST_COMPANION_PROFILE_NEARBY_DEVICE_STREAMING, android.permission.REQUEST_COMPANION_PROFILE_WATCH, android.permission.REQUEST_COMPANION_RUN_IN_BACKGROUND, android.permission.REQUEST_COMPANION_SELF_MANAGED, android.permission.REQUEST_COMPANION_START_FOREGROUND_SERVICES_FROM_BACKGROUND, android.permission.REQUEST_COMPANION_USE_DATA_IN_BACKGROUND, android.permission.REQUEST_DELETE_PACKAGES, android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS, android.permission.REQUEST_INSTALL_PACKAGES, android.permission.REQUEST_OBSERVE_COMPANION_DEVICE_PRESENCE, android.permission.REQUEST_PASSWORD_COMPLEXITY, android.permission.RUN_USER_INITIATED_JOBS, android.permission.SCHEDULE_EXACT_ALARM, android.permission.SEND_RESPOND_VIA_MESSAGE, android.permission.SEND_SMS, com.android.alarm.permission.SET_ALARM, android.permission.SET_ALWAYS_FINISH, android.permission.SET_ANIMATION_SCALE, android.permission.SET_BIOMETRIC_DIALOG_ADVANCED, android.permission.SET_DEBUG_APP, android.permission.SET_PROCESS_LIMIT, android.permission.SET_TIME, android.permission.SET_TIME_ZONE, android.permission.SET_WALLPAPER, android.permission.SET_WALLPAPER_HINTS, android.permission.SIGNAL_PERSISTENT_PROCESSES, android.permission.START_FOREGROUND_SERVICES_FROM_BACKGROUND, android.permission.START_VIEW_APP_FEATURES, android.permission.START_VIEW_PERMISSION_USAGE, android.permission.STATUS_BAR, android.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE, android.permission.SYSTEM_ALERT_WINDOW, android.permission.TRANSMIT_IR, android.permission.TURN_SCREEN_ON, com.android.launcher.permission.UNINSTALL_SHORTCUT, android.permission.UPDATE_DEVICE_STATS, android.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION, android.permission.USE_BIOMETRIC, android.permission.USE_EXACT_ALARM, android.permission.USE_FINGERPRINT, android.permission.USE_FULL_SCREEN_INTENT, android.permission.USE_ICC_AUTH_WITH_DEVICE_IDENTIFIER, android.permission.USE_SIP, android.permission.UWB_RANGING, android.permission.VIBRATE, android.permission.WAKE_LOCK, android.permission.WRITE_APN_SETTINGS, android.permission.WRITE_CALENDAR, android.permission.WRITE_CALL_LOG, android.permission.WRITE_CONTACTS, android.permission.WRITE_EXTERNAL_STORAGE, android.permission.WRITE_GSERVICES, android.permission.WRITE_SECURE_SETTINGS, android.permission.WRITE_SYNC_SETTINGS, com.android.voicemail.permission.WRITE_VOICEMAIL |
policy | String | The policy for granting the permission, value can be one of PROMPT, GRANT, DENY |
Structure of class PackageNameList
Property Name | Type | Description |
---|---|---|
packageNames | List<String> | A list of package names |
Structure of class SystemUpdate
Property Name | Type | Description |
---|---|---|
startMinutes | Integer | If the type is WINDOWED, the start of the maintenance window, measured as the number of minutes after midnight in the device's local time. This value must be between 0 and 1439, inclusive |
endMinutes | Integer | If the type is WINDOWED, the end of the maintenance window, measured as the number of minutes after midnight in device's local time. This value must be between 0 and 1439, inclusive. If this value is less than startMinutes, then the maintenance window spans midnight. If the maintenance window specified is smaller than 30 minutes, the actual window is extended to 30 minutes beyond the start time |
freezePeriods | List<FreezePeriod> | An annually repeating time period in which over-the-air (OTA) system updates are postponed to freeze the OS version running on a device. To prevent freezing the device indefinitely, each freeze period must be separated by at least 60 days. Note: If the type is not configured, this configuration item is invalid |
type | String | The type of system update to configure, value can be one of AUTOMATIC, WINDOWED, POSTPONE |
Structure of class FreezePeriod
Property Name | Type | Description |
---|---|---|
startDate | CustomDate | The start date (inclusive) of the freeze period. Note: year must not be set |
endDate | CustomDate | The end date (inclusive) of the freeze period. Must be no later than 90 days from the start date. If the end date is earlier than the start date, the freeze period is considered wrapping year-end. Note: year must not be set |
Structure of class CustomDate
Property Name | Type | Description |
---|---|---|
month | Integer | Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day |
day | Integer | Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant |
Structure of class DeviceConnectivityManagement
Property Name | Type | Description |
---|---|---|
tetheringSettings | String | Controls tethering settings. Based on the value set, the user is partially or fully disallowed from using different forms of tethering, value can be one of ALLOW_ALL_TETHERING, DISALLOW_WIFI_TETHERING, DISALLOW_ALL_TETHERING |
usbDataAccess | String | Controls what files and/or data can be transferred via USB. Supported only on company-owned devices, value can be one of ALLOW_USB_DATA_TRANSFER, DISALLOW_USB_FILE_TRANSFER, DISALLOW_USB_DATA_TRANSFER |
Structure of class DeviceConnectivityManagement
Property Name | Type | Description |
---|---|---|
tetheringSettings | String | Controls tethering settings. Based on the value set, the user is partially or fully disallowed from using different forms of tethering, value can be one of ALLOW_ALL_TETHERING, DISALLOW_WIFI_TETHERING, DISALLOW_ALL_TETHERING |
usbDataAccess | String | Controls what files and/or data can be transferred via USB. Supported only on company-owned devices, value can be one of ALLOW_USB_DATA_TRANSFER, DISALLOW_USB_FILE_TRANSFER, DISALLOW_USB_DATA_TRANSFER |
Structure of class PolicyEnforcementRule
Property Name | Type | Description |
---|---|---|
blockAction | BlockAction | An action to block access to apps and data on a company owned device or in a work profile. This action also triggers a user-facing notification with information (where possible) on how to correct the compliance issue. Note: wipeAction must also be specified |
settingName | String | The top-level policy to enforce, value can be one of PASSWORD_POLICIES, DEVICE_ENCRYPTION_POLICY, LOCK_SCREEN_KEYGUARD_DISABLED, INPUT_METHODS_SETTING, ACCESSIBILITY_SERVICES_SETTING, MINIMUM_API_LEVEL |
wipeAction | WipeAction | An action to reset a company owned device or delete a work profile. Note: blockAction must also be specified |
Structure of class BlockAction
Property Name | Type | Description |
---|---|---|
blockAfterDays | Integer | Number of days the policy is non-compliant before the device or work profile is blocked. To block access immediately, set to 0. blockAfterDays must be less than wipeAfterDays |
Structure of class WipeAction
Property Name | Type | Description |
---|---|---|
preserveFrp | Boolean | Whether the factory-reset protection data is preserved on the device. This setting doesn’t apply to work profiles |
wipeAfterDays | Integer | Number of days the policy is non-compliant before the device or work profile is wiped. wipeAfterDays must be greater than blockAfterDays |
Structure of class ApplicationPolicy
Property Name | Type | Description |
---|---|---|
appId | Long | The id of the emm app |
packageName | String | The package name of the emm app |
autoUpdateMode | String | Controls the auto-update mode for the app, value can be one of AUTO_UPDATE_DEFAULT, AUTO_UPDATE_POSTPONED, AUTO_UPDATE_HIGH_PRIORITY |
defaultPermissionPolicy | String | The default policy for all permissions requested by the app. If specified, this overrides the policy-level defaultPermissionPolicy which applies to all apps. It does not override the permissionGrants which applies to all apps, value can be one of PROMPT, GRANT, DENY |
installPriority | String | this controls the relative priority of installation, value can be one of DEFAULT, HIGH_PRIORITY, MEDIUM_PRIORITY, LOW_PRIORITY, default value is DEFAULT |
installType | String | The type of installation to perform, value can be one of FORCE_INSTALLED, PREINSTALLED, AVAILABLE, BLOCKED, KIOSK, REQUIRED_FOR_SETUP |
lockFlag | Boolean | Whether the policy application is locked, default value is false |
lockedByReseller | String | The name of the reseller whose policy application is locked |
permissionGrants | List<AppPermissionGrant> | Explicit permission grants or denials for the app. These values override the defaultPermissionPolicy and permissionGrants which apply to all apps |
Structure of class AppPermissionGrant
Property Name | Type | Description |
---|---|---|
permission | String | The Android permission or group, each application has different permission groups, the value can be obtained by calling the getEmmAppPermissionList API |
policy | String | The policy for granting the permission, value can be one of PROMPT, GRANT, DENY |
Possible client validation errors
Parameter resellerName cannot be null! Parameter resellerName is too long, maxlength is 64!
Possible business codes
Business Code | Message | Description |
---|---|---|
998 | Bad request | |
1759 | Reseller doesn't exist | |
1762 | Reseller name is mandatory | |
1767 | Reseller name is too long |
Create reseller EMM policy API allow the thirdparty system create reseller EMM policy remotely.
API
public Result<String> createResellerEmmPolicy(ResellerEmmPolicyCreateRequest resellerEmmPolicyCreateRequest);
Input parameter(s) description
Name | Type | Nullable | Description |
---|---|---|---|
resellerEmmPolicyCreateRequest | ResellerEmmPolicyCreateRequest | false | The request object. The structure shows below |
Structure of class ResellerEmmPolicyCreateRequest
Property Name | Type | Nullable | Description |
---|---|---|---|
resellerName | String | false | The reseller of EMM device belongs to. Max length is 64 |
contentInfo | PolicyUpdatedContentDTO | true | The content of EMM policy. When inheritFlag is true, the contentInfo value can be ignored, and when inheritFlag is false, the contentInfo value is required |
inheritFlag | Boolean | false | Whether inherit EMM policy |
Structure of class PolicyUpdatedContentDTO
Property Name | Type | Nullable | Description |
---|---|---|---|
adjustVolumeDisabled | Boolean | true | Whether adjusting the master volume is disabled. Also mutes the device |
advancedSecurityOverrides | AdvancedSecurityOverrides | true | Advanced security settings. In most cases, setting these is not needed |
alwaysOnVpnPackage | AlwaysOnVpnPackage | true | Configuration for an always-on VPN connection |
appAutoUpdatePolicy | String | true | Recommended alternative: autoUpdateMode which is set per app, provides greater flexibility around update frequency, value can be one of CHOICE_TO_THE_USER, NEVER, WIFI_ONLY, ALWAYS |
autoDateAndTimeZone | String | true | Whether auto date, time, and time zone are enabled on a company-owned device, value can be one of AUTO_DATE_AND_TIME_ZONE_USER_CHOICE, AUTO_DATE_AND_TIME_ZONE_ENFORCED |
bluetoothDisabled | Boolean | true | Whether bluetooth is disabled |
cameraAccess | String | true | Controls the use of the camera and whether the user has access to the camera access toggle, value can be one of CAMERA_ACCESS_USER_CHOICE, CAMERA_ACCESS_DISABLED, CAMERA_ACCESS_ENFORCED |
cellBroadcastsConfigDisabled | Boolean | true | Whether configuring cell broadcast is disabled |
dataRoamingDisabled | Boolean | true | Whether roaming data services are disabled |
deviceRadioState | DeviceRadioState | true | Covers controls for radio state such as Wi-Fi, bluetooth, and more |
encryptionPolicy | String | true | Whether encryption is enabled, value can be one of ENCRYPTION_POLICY_UNSPECIFIED, ENABLED_WITHOUT_PASSWORD, ENABLED_WITH_PASSWORD |
factoryResetDisabled | Boolean | true | Whether factory resetting from settings is disabled |
funDisabled | Boolean | true | Whether the user is allowed to have fun. Controls whether the Easter egg game in Settings is disabled |
installAppsDisabled | Boolean | true | Whether user installation of apps is disabled |
keyguardDisabledFeatures | List<String> | true | Disabled keyguard customizations, keyguardDisabledFeatures content can be any value of NOTIFICATIONS, UNREDACTED_NOTIFICATIONS, TRUST_AGENTS, DISABLE_FINGERPRINT, FACE, BIOMETRICS, SHORTCUTS, ALL_FEATURES |
locationMode | String | true | The degree of location detection enabled, value can be one of LOCATION_USER_CHOICE, LOCATION_ENFORCED, LOCATION_DISABLED |
maximumTimeToLock | Long | true | Maximum time in milliseconds for user activity until the device locks. A value of 0 means there is no restriction, value can be one of 0, 15000, 30000, 60000, 120000, 300000, 600000, 1800000 |
microphoneAccess | String | true | Controls the use of the microphone and whether the user has access to the microphone access toggle. This applies only on fully managed devices, value can be one of MICROPHONE_ACCESS_USER_CHOICE, MICROPHONE_ACCESS_DISABLED, MICROPHONE_ACCESS_ENFORCED |
minimumApiLevel | Integer | true | The minimum allowed Android API level, the range of values is 1 to 999999 |
mobileNetworksConfigDisabled | Boolean | true | Whether configuring mobile networks is disabled |
mountPhysicalMediaDisabled | Boolean | true | Whether the user mounting physical external media is disabled |
networkEscapeHatchEnabled | Boolean | true | Whether the user mounting physical external media is disabled |
networkResetDisabled | Boolean | true | Whether resetting network settings is disabled |
networkConfigurations | List<NetworkConfiguration> | true | Network configuration for the device |
outgoingCallsDisabled | Boolean | true | Whether outgoing calls are disabled |
passwordPolicies | PasswordRequirements | true | Password requirement policies. Different policies can be set for work profile or fully managed devices by setting the passwordScope field in the policy |
permissionGrants | List<PermissionGrant> | true | Explicit permission or group grants or denials for all apps |
permittedAccessibilityServices | PackageNameList | true | Specifies permitted accessibility services. If the field is not set, any accessibility service can be used. If the field is set, only the accessibility services in this list and the system's built-in accessibility service can be used. In particular, if the field is set to empty, only the system's built-in accessibility servicess can be used. This can be set on fully managed devices and on work profiles. When applied to a work profile, this affects both the personal profile and the work profile |
permittedInputMethods | PackageNameList | true | If present, only the input methods provided by packages in this list are permitted. If this field is present, but the list is empty, then only system input methods are permitted |
playStoreMode | String | true | This mode controls which apps are available to the user in the Play Store and the behavior on the device when apps are removed from the policy, value can be one of WHITELIST, BLACKLIST |
printingPolicy | String | true | Optional. Controls whether printing is allowed. This is supported on devices running Android 9 and above, value is PRINTING_DISALLOWED |
screenCaptureDisabled | Boolean | true | Whether screen capture is disabled |
setWallpaperDisabled | Boolean | true | Whether changing the wallpaper is disabled |
shareLocationDisabled | Boolean | true | Whether location sharing is disabled. shareLocationDisabled is supported for both fully managed devices and personally owned work profiles |
smsDisabled | Boolean | true | Whether sending and receiving SMS messages is disabled |
stayOnPluggedModes | List<String> | true | The battery plugged in modes for which the device stays on. When using this setting, it is recommended to clear maximumTimeToLock so that the device doesn't lock itself while it stays on, stayOnPluggedModes content can be any value of AC, USB, WIRELESS |
systemUpdate | SystemUpdate | true | The system update policy, which controls how OS updates are applied. If the update type is WINDOWED, the update window will automatically apply to Play app updates as well. Note: Google Play system updates (also called Mainline updates) are automatically downloaded and require a device reboot to be installed. Refer to the mainline section in Manage system updates for further details |
uninstallAppsDisabled | Boolean | true | Whether user uninstallation of applications is disabled. This prevents apps from being uninstalled, even those removed using applications |
vpnConfigDisabled | Boolean | true | Whether configuring VPN is disabled |
deviceConnectivityManagement | DeviceConnectivityManagement | true | Covers controls for device connectivity such as Wi-Fi, USB data access, keyboard/mouse connections, and more |
deviceOwnerLockScreenInfo | String | true | The device owner information to be shown on the lock screen, max length is 255 |
policyEnforcementRules | List<PolicyEnforcementRule> | true | Rules that define the behavior when a particular policy can not be applied on device |
applications | List<ApplicationPolicy> | true | Policy applied to apps. This can have at most 100 elements |
Structure of class AdvancedSecurityOverrides
Property Name | Type | Nullable | Description |
---|---|---|---|
developerSettings | String | true | Controls access to developer settings: developer options and safe boot, value can be one of DEVELOPER_SETTINGS_DISABLED, DEVELOPER_SETTINGS_ALLOWED |
googlePlayProtectVerifyApps | String | true | Whether Google Play Protect verification is enforced, value can be one of VERIFY_APPS_USER_CHOICE, VERIFY_APPS_ENFORCED |
untrustedAppsPolicy | String | true | The policy for untrusted apps (apps from unknown sources) enforced on the device, value can be one of DISALLOW_INSTALL, ALLOW_INSTALL_IN_PERSONAL_PROFILE_ONLY, ALLOW_INSTALL_DEVICE_WIDE |
Structure of class AlwaysOnVpnPackage
Property Name | Type | Nullable | Description |
---|---|---|---|
lockdownEnabled | Boolean | true | Disallows networking when the VPN is not connected |
packageName | String | true | The package name of the VPN app, max length is 128 |
Structure of class DeviceRadioState
Property Name | Type | Nullable | Description |
---|---|---|---|
airplaneModeState | String | true | Controls whether airplane mode can be toggled by the user or not, value is AIRPLANE_MODE_DISABLED |
minimumWifiSecurityLevel | String | true | The minimum required security level of Wi-Fi networks that the device can connect to, value can be one of OPEN_NETWORK_SECURITY, PERSONAL_NETWORK_SECURITY, ENTERPRISE_NETWORK_SECURITY, ENTERPRISE_BIT192_NETWORK_SECURITY |
Structure of class NetworkConfiguration
Property Name | Type | Nullable | Description |
---|---|---|---|
ssid | String | true | Wi-Fi SSID, max length is 32 |
cipherType | String | true | Wi-Fi cipher type, value can be one of NONE, WEP, WPA_WPA2_PSK |
password | String | true | Wi-Fi password, for WEP password, the password length is 10 or 26, for WPA_WPA2_PSK password, the password length range is 8 to 63 |
proxyType | String | true | Wi-Fi proxy type, value can be one of NONE, MANUAL, PAC |
hostName | String | true | Wi-Fi proxy host name |
port | Integer | true | Wi-Fi proxy port, The range of values is 1 to 65535 |
pacUrl | String | true | WIFI pac url |
Structure of class PasswordRequirements
Property Name | Type | Nullable | Description |
---|---|---|---|
maximumFailedPasswordsForWipe | Integer | true | Number of incorrect device-unlock passwords that can be entered before a device is wiped. A value of 0 means there is no restriction, the range of values is 0 to 9999 |
passwordExpirationTimeout | String | true | Password expiration timeout. A duration in seconds with up to nine fractional digits, ending with 's', the range of values is 0 to 99999999999 |
passwordHistoryLength | Integer | true | The length of the password history. After setting this field, the user won't be able to enter a new password that is the same as any password in the history. A value of 0 means there is no restriction, the range of values is 0 to 9999 |
passwordMinimumLength | Integer | true | The minimum allowed password length. A value of 0 means there is no restriction. Only enforced when passwordQuality is NUMERIC_COMPLEX, ALPHABETIC, ALPHANUMERIC, or COMPLEX, the range of values is 4 to 16 |
passwordMinimumLetters | Integer | true | Minimum number of letters required in the password. Only enforced when passwordQuality is COMPLEX, the range of values is 0 to 99 |
passwordMinimumLowerCase | Integer | true | Minimum number of lower case letters required in the password. Only enforced when passwordQuality is COMPLEX, the range of values is 0 to 99 |
passwordMinimumNumeric | Integer | true | Minimum number of numerical digits required in the password. Only enforced when passwordQuality is COMPLEX, the range of values is 0 to 99 |
passwordMinimumSymbols | Integer | true | Minimum number of symbols required in the password. Only enforced when passwordQuality is COMPLEX, the range of values is 0 to 99 |
passwordMinimumUpperCase | Integer | true | Minimum number of upper case letters required in the password. Only enforced when passwordQuality is COMPLEX, the range of values is 0 to 99 |
passwordQuality | String | true | The required password quality, value can be one of PASSWORD_QUALITY_UNSPECIFIED, SOMETHING, NUMERIC_COMPLEX, ALPHABETIC, ALPHANUMERIC, COMPLEX |
requirePasswordUnlock | String | true | The length of time after a device or work profile is unlocked using a strong form of authentication (password, PIN, pattern) that it can be unlocked using any other authentication method (e.g. fingerprint, trust agents, face). After the specified time period elapses, only strong forms of authentication can be used to unlock the device or work profile, value can be one of USE_DEFAULT_DEVICE_TIMEOUT, REQUIRE_EVERY_DAY |
Structure of class PermissionGrant
Property Name | Type | Nullable | Description |
---|---|---|---|
permission | String | true | The Android permission or group, value can be one of android.permission-group.ACTIVITY_RECOGNITION, android.permission-group.CALENDAR, android.permission-group.CALL_LOG, android.permission-group.CAMERA, android.permission-group.CONTACTS, android.permission-group.LOCATION, android.permission-group.MICROPHONE, android.permission-group.NEARBY_DEVICES, android.permission-group.NOTIFICATIONS, android.permission-group.PHONE, android.permission-group.READ_MEDIA_AURAL, android.permission-group.READ_MEDIA_VISUAL, android.permission-group.SENSORS, android.permission-group.SMS, android.permission-group.STORAGE, android.permission.ACCEPT_HANDOVER, android.permission.ACCESS_BACKGROUND_LOCATION, android.permission.ACCESS_BLOBS_ACROSS_USERS, android.permission.ACCESS_CHECKIN_PROPERTIES, android.permission.ACCESS_COARSE_LOCATION, android.permission.ACCESS_FINE_LOCATION, android.permission.ACCESS_HIDDEN_PROFILES, android.permission.ACCESS_LOCATION_EXTRA_COMMANDS, android.permission.ACCESS_MEDIA_LOCATION, android.permission.ACCESS_NETWORK_STATE, android.permission.ACCESS_NOTIFICATION_POLICY, android.permission.ACCESS_WIFI_STATE, android.permission.ACCOUNT_MANAGER, android.permission.ACTIVITY_RECOGNITION, com.android.voicemail.permission.ADD_VOICEMAIL, android.permission.ANSWER_PHONE_CALLS, android.permission.BATTERY_STATS, android.permission.BIND_ACCESSIBILITY_SERVICE, android.permission.BIND_APPWIDGET, android.permission.BIND_AUTOFILL_SERVICE, android.permission.BIND_CALL_REDIRECTION_SERVICE, android.permission.BIND_CARRIER_MESSAGING_CLIENT_SERVICE, android.permission.BIND_CARRIER_MESSAGING_SERVICE, android.permission.BIND_CARRIER_SERVICES, android.permission.BIND_CHOOSER_TARGET_SERVICE, android.permission.BIND_COMPANION_DEVICE_SERVICE, android.permission.BIND_CONDITION_PROVIDER_SERVICE, android.permission.BIND_CONTROLS, android.permission.BIND_CREDENTIAL_PROVIDER_SERVICE, android.permission.BIND_DEVICE_ADMIN, android.permission.BIND_DREAM_SERVICE, android.permission.BIND_INCALL_SERVICE, android.permission.BIND_INPUT_METHOD, android.permission.BIND_MIDI_DEVICE_SERVICE, android.permission.BIND_NFC_SERVICE, android.permission.BIND_NOTIFICATION_LISTENER_SERVICE, android.permission.BIND_PRINT_SERVICE, android.permission.BIND_QUICK_ACCESS_WALLET_SERVICE, android.permission.BIND_QUICK_SETTINGS_TILE, android.permission.BIND_REMOTEVIEWS, android.permission.BIND_SCREENING_SERVICE, android.permission.BIND_TELECOM_CONNECTION_SERVICE, android.permission.BIND_TEXT_SERVICE, android.permission.BIND_TV_INPUT, android.permission.BIND_TV_INTERACTIVE_APP, android.permission.BIND_VISUAL_VOICEMAIL_SERVICE, android.permission.BIND_VOICE_INTERACTION, android.permission.BIND_VPN_SERVICE, android.permission.BIND_VR_LISTENER_SERVICE, android.permission.BIND_WALLPAPER, android.permission.BLUETOOTH, android.permission.BLUETOOTH_ADMIN, android.permission.BLUETOOTH_ADVERTISE, android.permission.BLUETOOTH_CONNECT, android.permission.BLUETOOTH_PRIVILEGED, android.permission.BLUETOOTH_SCAN, android.permission.BODY_SENSORS, android.permission.BODY_SENSORS_BACKGROUND, android.permission.BROADCAST_PACKAGE_REMOVED, android.permission.BROADCAST_SMS, android.permission.BROADCAST_STICKY, android.permission.BROADCAST_WAP_PUSH, android.permission.CALL_COMPANION_APP, android.permission.CALL_PHONE, android.permission.CALL_PRIVILEGED, android.permission.CAMERA, android.permission.CAPTURE_AUDIO_OUTPUT, android.permission.CHANGE_COMPONENT_ENABLED_STATE, android.permission.CHANGE_CONFIGURATION, android.permission.CHANGE_NETWORK_STATE, android.permission.CHANGE_WIFI_MULTICAST_STATE, android.permission.CHANGE_WIFI_STATE, android.permission.CLEAR_APP_CACHE, android.permission.CONFIGURE_WIFI_DISPLAY, android.permission.CONTROL_LOCATION_UPDATES, android.permission.CREDENTIAL_MANAGER_QUERY_CANDIDATE_CREDENTIALS, android.permission.CREDENTIAL_MANAGER_SET_ALLOWED_PROVIDERS, android.permission.CREDENTIAL_MANAGER_SET_ORIGIN, android.permission.DELETE_CACHE_FILES, android.permission.DELETE_PACKAGES, android.permission.DELIVER_COMPANION_MESSAGES, android.permission.DETECT_SCREEN_CAPTURE, android.permission.DETECT_SCREEN_RECORDING, android.permission.DIAGNOSTIC, android.permission.DISABLE_KEYGUARD, android.permission.DUMP, android.permission.ENFORCE_UPDATE_OWNERSHIP, android.permission.EXECUTE_APP_ACTION, android.permission.EXPAND_STATUS_BAR, android.permission.FACTORY_TEST, android.permission.FOREGROUND_SERVICE, android.permission.FOREGROUND_SERVICE_CAMERA, android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE, android.permission.FOREGROUND_SERVICE_DATA_SYNC, android.permission.FOREGROUND_SERVICE_HEALTH, android.permission.FOREGROUND_SERVICE_LOCATION, android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK, android.permission.FOREGROUND_SERVICE_MEDIA_PROCESSING, android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION, android.permission.FOREGROUND_SERVICE_MICROPHONE, android.permission.FOREGROUND_SERVICE_PHONE_CALL, android.permission.FOREGROUND_SERVICE_REMOTE_MESSAGING, android.permission.FOREGROUND_SERVICE_SPECIAL_USE, android.permission.FOREGROUND_SERVICE_SYSTEM_EXEMPTED, android.permission.GET_ACCOUNTS, android.permission.GET_ACCOUNTS_PRIVILEGED, android.permission.GET_PACKAGE_SIZE, android.permission.GET_TASKS, android.permission.GLOBAL_SEARCH, android.permission.HIDE_OVERLAY_WINDOWS, android.permission.HIGH_SAMPLING_RATE_SENSORS, android.permission.INSTALL_LOCATION_PROVIDER, android.permission.INSTALL_PACKAGES, com.android.launcher.permission.INSTALL_SHORTCUT, android.permission.INSTANT_APP_FOREGROUND_SERVICE, android.permission.INTERACT_ACROSS_PROFILES, android.permission.INTERNET, android.permission.KILL_BACKGROUND_PROCESSES, android.permission.LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE, android.permission.LAUNCH_MULTI_PANE_SETTINGS_DEEP_LINK, android.permission.LOADER_USAGE_STATS, android.permission.LOCATION_HARDWARE, android.permission.MANAGE_DEVICE_LOCK_STATE, android.permission.MANAGE_DOCUMENTS, android.permission.MANAGE_EXTERNAL_STORAGE, android.permission.MANAGE_MEDIA, android.permission.MANAGE_ONGOING_CALLS, android.permission.MANAGE_OWN_CALLS, android.permission.MANAGE_WIFI_INTERFACES, android.permission.MANAGE_WIFI_NETWORK_SELECTION, android.permission.MASTER_CLEAR, android.permission.MEDIA_CONTENT_CONTROL, android.permission.MEDIA_ROUTING_CONTROL, android.permission.MODIFY_AUDIO_SETTINGS, android.permission.MODIFY_PHONE_STATE, android.permission.MOUNT_FORMAT_FILESYSTEMS, android.permission.MOUNT_UNMOUNT_FILESYSTEMS, android.permission.NEARBY_WIFI_DEVICES, android.permission.NFC, android.permission.NFC_PREFERRED_PAYMENT_INFO, android.permission.NFC_TRANSACTION_EVENT, android.permission.OVERRIDE_WIFI_CONFIG, android.permission.PACKAGE_USAGE_STATS, android.permission.PERSISTENT_ACTIVITY, android.permission.POST_NOTIFICATIONS, android.permission.PROCESS_OUTGOING_CALLS, android.permission.PROVIDE_OWN_AUTOFILL_SUGGESTIONS, android.permission.PROVIDE_REMOTE_CREDENTIALS, android.permission.QUERY_ALL_PACKAGES, android.permission.READ_ASSISTANT_APP_SEARCH_DATA, android.permission.READ_BASIC_PHONE_STATE, android.permission.READ_CALENDAR, android.permission.READ_CALL_LOG, android.permission.READ_CONTACTS, android.permission.READ_DROPBOX_DATA, android.permission.READ_EXTERNAL_STORAGE, android.permission.READ_HOME_APP_SEARCH_DATA, android.permission.READ_LOGS, android.permission.READ_MEDIA_AUDIO, android.permission.READ_MEDIA_IMAGES, android.permission.READ_MEDIA_VIDEO, android.permission.READ_MEDIA_VISUAL_USER_SELECTED, android.permission.READ_NEARBY_STREAMING_POLICY, android.permission.READ_PHONE_NUMBERS, android.permission.READ_PHONE_STATE, android.permission.READ_PRECISE_PHONE_STATE, android.permission.READ_SMS, android.permission.READ_SYNC_SETTINGS, android.permission.READ_SYNC_STATS, com.android.voicemail.permission.READ_VOICEMAIL, android.permission.REBOOT, android.permission.RECEIVE_BOOT_COMPLETED, android.permission.RECEIVE_MMS, android.permission.RECEIVE_SMS, android.permission.RECEIVE_WAP_PUSH, android.permission.RECORD_AUDIO, android.permission.REORDER_TASKS, android.permission.REQUEST_COMPANION_PROFILE_APP_STREAMING, android.permission.REQUEST_COMPANION_PROFILE_AUTOMOTIVE_PROJECTION, android.permission.REQUEST_COMPANION_PROFILE_COMPUTER, android.permission.REQUEST_COMPANION_PROFILE_GLASSES, android.permission.REQUEST_COMPANION_PROFILE_NEARBY_DEVICE_STREAMING, android.permission.REQUEST_COMPANION_PROFILE_WATCH, android.permission.REQUEST_COMPANION_RUN_IN_BACKGROUND, android.permission.REQUEST_COMPANION_SELF_MANAGED, android.permission.REQUEST_COMPANION_START_FOREGROUND_SERVICES_FROM_BACKGROUND, android.permission.REQUEST_COMPANION_USE_DATA_IN_BACKGROUND, android.permission.REQUEST_DELETE_PACKAGES, android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS, android.permission.REQUEST_INSTALL_PACKAGES, android.permission.REQUEST_OBSERVE_COMPANION_DEVICE_PRESENCE, android.permission.REQUEST_PASSWORD_COMPLEXITY, android.permission.RUN_USER_INITIATED_JOBS, android.permission.SCHEDULE_EXACT_ALARM, android.permission.SEND_RESPOND_VIA_MESSAGE, android.permission.SEND_SMS, com.android.alarm.permission.SET_ALARM, android.permission.SET_ALWAYS_FINISH, android.permission.SET_ANIMATION_SCALE, android.permission.SET_BIOMETRIC_DIALOG_ADVANCED, android.permission.SET_DEBUG_APP, android.permission.SET_PROCESS_LIMIT, android.permission.SET_TIME, android.permission.SET_TIME_ZONE, android.permission.SET_WALLPAPER, android.permission.SET_WALLPAPER_HINTS, android.permission.SIGNAL_PERSISTENT_PROCESSES, android.permission.START_FOREGROUND_SERVICES_FROM_BACKGROUND, android.permission.START_VIEW_APP_FEATURES, android.permission.START_VIEW_PERMISSION_USAGE, android.permission.STATUS_BAR, android.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE, android.permission.SYSTEM_ALERT_WINDOW, android.permission.TRANSMIT_IR, android.permission.TURN_SCREEN_ON, com.android.launcher.permission.UNINSTALL_SHORTCUT, android.permission.UPDATE_DEVICE_STATS, android.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION, android.permission.USE_BIOMETRIC, android.permission.USE_EXACT_ALARM, android.permission.USE_FINGERPRINT, android.permission.USE_FULL_SCREEN_INTENT, android.permission.USE_ICC_AUTH_WITH_DEVICE_IDENTIFIER, android.permission.USE_SIP, android.permission.UWB_RANGING, android.permission.VIBRATE, android.permission.WAKE_LOCK, android.permission.WRITE_APN_SETTINGS, android.permission.WRITE_CALENDAR, android.permission.WRITE_CALL_LOG, android.permission.WRITE_CONTACTS, android.permission.WRITE_EXTERNAL_STORAGE, android.permission.WRITE_GSERVICES, android.permission.WRITE_SECURE_SETTINGS, android.permission.WRITE_SYNC_SETTINGS, com.android.voicemail.permission.WRITE_VOICEMAIL |
policy | String | true | The policy for granting the permission, value can be one of PROMPT, GRANT, DENY |
Structure of class PackageNameList
Property Name | Type | Nullable | Description |
---|---|---|---|
packageNames | List<String> | true | A list of package names, the elements in the list can contain multiple package names, separated by commas. The maximum length of each element is 255, and the maximum length of separated package names in elements is 128 |
Structure of class SystemUpdate
Property Name | Type | Nullable | Description |
---|---|---|---|
startMinutes | Integer | true | If the type is WINDOWED, the start of the maintenance window, measured as the number of minutes after midnight in the device's local time. This value must be between 0 and 1439, inclusive |
endMinutes | Integer | true | If the type is WINDOWED, the end of the maintenance window, measured as the number of minutes after midnight in device's local time. This value must be between 0 and 1439, inclusive. If this value is less than startMinutes, then the maintenance window spans midnight. If the maintenance window specified is smaller than 30 minutes, the actual window is extended to 30 minutes beyond the start time |
freezePeriods | List<FreezePeriod> | true | An annually repeating time period in which over-the-air (OTA) system updates are postponed to freeze the OS version running on a device. To prevent freezing the device indefinitely, each freeze period must be separated by at least 60 days. Note: If the type is not configured, this configuration item is invalid |
type | String | true | The type of system update to configure, value can be one of AUTOMATIC, WINDOWED, POSTPONE |
Structure of class FreezePeriod
Property Name | Type | Nullable | Description |
---|---|---|---|
startDate | CustomDate | true | The start date (inclusive) of the freeze period. Note: year must not be set |
endDate | CustomDate | true | The end date (inclusive) of the freeze period. Must be no later than 90 days from the start date. If the end date is earlier than the start date, the freeze period is considered wrapping year-end. Note: year must not be set |
Structure of class CustomDate
Property Name | Type | Nullable | Description |
---|---|---|---|
month | Integer | true | Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day |
day | Integer | true | Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant |
Structure of class DeviceConnectivityManagement
Property Name | Type | Nullable | Description |
---|---|---|---|
tetheringSettings | String | true | Controls tethering settings. Based on the value set, the user is partially or fully disallowed from using different forms of tethering, value can be one of ALLOW_ALL_TETHERING, DISALLOW_WIFI_TETHERING, DISALLOW_ALL_TETHERING |
usbDataAccess | String | true | Controls what files and/or data can be transferred via USB. Supported only on company-owned devices, value can be one of ALLOW_USB_DATA_TRANSFER, DISALLOW_USB_FILE_TRANSFER, DISALLOW_USB_DATA_TRANSFER |
Structure of class DeviceConnectivityManagement
Property Name | Type | Nullable | Description |
---|---|---|---|
tetheringSettings | String | true | Controls tethering settings. Based on the value set, the user is partially or fully disallowed from using different forms of tethering, value can be one of ALLOW_ALL_TETHERING, DISALLOW_WIFI_TETHERING, DISALLOW_ALL_TETHERING |
usbDataAccess | String | true | Controls what files and/or data can be transferred via USB. Supported only on company-owned devices, value can be one of ALLOW_USB_DATA_TRANSFER, DISALLOW_USB_FILE_TRANSFER, DISALLOW_USB_DATA_TRANSFER |
Structure of class PolicyEnforcementRule
Property Name | Type | Nullable | Description |
---|---|---|---|
blockAction | BlockAction | true | An action to block access to apps and data on a company owned device or in a work profile. This action also triggers a user-facing notification with information (where possible) on how to correct the compliance issue. Note: wipeAction must also be specified |
settingName | String | true | The top-level policy to enforce, value can be one of PASSWORD_POLICIES, DEVICE_ENCRYPTION_POLICY, LOCK_SCREEN_KEYGUARD_DISABLED, INPUT_METHODS_SETTING, ACCESSIBILITY_SERVICES_SETTING, MINIMUM_API_LEVEL |
wipeAction | WipeAction | true | An action to reset a company owned device or delete a work profile. Note: blockAction must also be specified |
Structure of class BlockAction
Property Name | Type | Nullable | Description |
---|---|---|---|
blockAfterDays | Integer | true | Number of days the policy is non-compliant before the device or work profile is blocked. To block access immediately, set to 0. blockAfterDays must be less than wipeAfterDays, the range of values is 0 to 30 |
Structure of class WipeAction
Property Name | Type | Nullable | Description |
---|---|---|---|
preserveFrp | Boolean | true | Whether the factory-reset protection data is preserved on the device. This setting doesn’t apply to work profiles |
wipeAfterDays | Integer | true | Number of days the policy is non-compliant before the device or work profile is wiped. wipeAfterDays must be greater than blockAfterDays, the range of values is 0 to 30 |
Structure of class ApplicationPolicy
Property Name | Type | Nullable | Description |
---|---|---|---|
packageName | String | true | The package name of the emm app, max length is 128 |
autoUpdateMode | String | true | Controls the auto-update mode for the app, value can be one of AUTO_UPDATE_DEFAULT, AUTO_UPDATE_POSTPONED, AUTO_UPDATE_HIGH_PRIORITY |
defaultPermissionPolicy | String | true | The default policy for all permissions requested by the app. If specified, this overrides the policy-level defaultPermissionPolicy which applies to all apps. It does not override the permissionGrants which applies to all apps, value can be one of PROMPT, GRANT, DENY |
installPriority | String | true | this controls the relative priority of installation, value can be one of DEFAULT, HIGH_PRIORITY, MEDIUM_PRIORITY, LOW_PRIORITY, default value is DEFAULT |
installType | String | true | The type of installation to perform, value can be one of FORCE_INSTALLED, PREINSTALLED, AVAILABLE, BLOCKED, KIOSK, REQUIRED_FOR_SETUP |
lockFlag | Boolean | true | Whether the policy application is locked, default value is false |
permissionGrants | List<AppPermissionGrant> | true | Explicit permission grants or denials for the app. These values override the defaultPermissionPolicy and permissionGrants which apply to all apps |
Structure of class AppPermissionGrant
Property Name | Type | Nullable | Description |
---|---|---|---|
permission | String | true | The Android permission or group, each application has different permission groups, the value can be obtained by calling the getEmmAppPermissionList API |
policy | String | true | The policy for granting the permission, value can be one of PROMPT, GRANT, DENY |
Sample codes
EmmAppApi emmAppApi = new EmmAppApi("https://api.whatspos.com/p-market-api", "RCA9MDH6YN3WSSGPW6TJ", "TUNLDZVZECHNKZ4FW07XFCKN2W0N8ZDEA5ENKZYN");
ResellerEmmPolicyCreateRequest request = new ResellerEmmPolicyCreateRequest();
request.setResellerName("PAX");
PolicyUpdatedContentDTO policyUpdatedContentDTO = new PolicyUpdatedContentDTO();
policyUpdatedContentDTO.setAdjustVolumeDisabled(Boolean.TRUE);
request.setContentInfo(policyUpdatedContentDTO);
request.setInheritFlag(Boolean.FALSE);
Result<String> result = emmPolicyApi.createResellerEmmPolicy(request);
Client side validation failed sample result(JSON formatted)
{
"businessCode": -1,
"validationErrors": ["Parameter resellerName cannot be null!"]
}
Server side validation failed sample result(JSON formatted)
{
"businessCode": 1759,
"message": "Reseller doesn't exist"
}
Successful sample result
{
"businessCode": 0,
}
Possible client validation errors
Parameter resellerEmmPolicyCreateRequest cannot be null! Parameter resellerName cannot be null! Parameter resellerName is too long, maxlength is 64! Parameter contentInfo cannot be null! Parameter inheritFlag cannot be null!
Possible business codes
Business Code | Message | Description |
---|---|---|
113 | Your request is invalid, please try again or contact marketplace administrator | |
1759 | Reseller doesn't exist | |
1762 | Reseller name is mandatory | |
1767 | Reseller name is too long | |
61606 | Unable to override the policy,the current marketplace cannot have more than {0} customized policies | |
61607 | Up to {0} applications can be locked in a policy | |
61609 | Adding application failed. Exceeded {0} limit. | |
61610 | Action failed. Only one app in the policy can be installed in Kiosk mode | |
61636 | {0} applications do not exist | |
61645 | Locked application policies cannot be operated | |
61651 | EMM application configuration is invalid | |
61654 | EMM for Android not subscribed | |
61655 | EMM for Android not distributed | |
61656 | The market is not bound to EMM for Android | |
61660 | EMM app package name is mandatory | |
61661 | EMM app package name is too long | |
61663 | {0} is invalid | |
61665 | The root policy cannot be modified to inherited policy |
The get merchant EMM policy API allows thirdparty system to get merchant EMM policy.
API
public Result<EmmPolicyDTO> getMerchantEmmPolicy(String resellerName, String merchantName);
Input parameter(s) description
Name | Type | Nullable | Description |
---|---|---|---|
resellerName | String | false | get EMM policy under the reseller |
merchantName | String | false | get EMM policy under the merchant |
Sample codes
EmmAppApi emmAppApi = new EmmAppApi("https://api.whatspos.com/p-market-api", "RCA9MDH6YN3WSSGPW6TJ", "TUNLDZVZECHNKZ4FW07XFCKN2W0N8ZDEA5ENKZYN");
Result<EmmPolicyDTO> result = emmPolicyApi.getMerchantEmmPolicy("PAX","test");
Client side validation failed sample result(JSON formatted)
{
"businessCode": -1,
"validationErrors": ["Parameter merchantName cannot be null!"]
}
Server side validation failed sample result(JSON formatted)
{
"businessCode": 1720,
"message": "Merchant doesn't exist"
}
Successful sample result
{
"businessCode": 0,
"data": {
"customPolicyCount": 4,
"name": "test",
"contentInfo": {
"adjustVolumeDisabled": true,
"advancedSecurityOverrides": {
"developerSettings": "DEVELOPER_SETTINGS_ALLOWED",
"googlePlayProtectVerifyApps": "VERIFY_APPS_ENFORCED",
"untrustedAppsPolicy": "ALLOW_INSTALL_IN_PERSONAL_PROFILE_ONLY"
},
"alwaysOnVpnPackage": {
"lockdownEnabled": true,
"packageName": "com.test"
},
"appAutoUpdatePolicy": "NEVER",
"autoDateAndTimeZone": "AUTO_DATE_AND_TIME_ZONE_ENFORCED",
"bluetoothDisabled": true,
"cameraAccess": "CAMERA_ACCESS_DISABLED",
"cellBroadcastsConfigDisabled": true,
"dataRoamingDisabled": true,
"deviceRadioState": {
"airplaneModeState": "AIRPLANE_MODE_DISABLED",
"minimumWifiSecurityLevel": "PERSONAL_NETWORK_SECURITY"
},
"encryptionPolicy": "ENABLED_WITHOUT_PASSWORD",
"factoryResetDisabled": true,
"funDisabled": true,
"installAppsDisabled": true,
"keyguardDisabledFeatures": [
"NOTIFICATIONS",
"UNREDACTED_NOTIFICATIONS",
"TRUST_AGENTS",
"DISABLE_FINGERPRINT",
"FACE",
"BIOMETRICS",
"SHORTCUTS",
"ALL_FEATURES"
],
"locationMode": "LOCATION_DISABLED",
"maximumTimeToLock": 15000,
"microphoneAccess": "MICROPHONE_ACCESS_DISABLED",
"minimumApiLevel": 1,
"mobileNetworksConfigDisabled": true,
"mountPhysicalMediaDisabled": true,
"networkEscapeHatchEnabled": true,
"networkResetDisabled": true,
"networkConfigurations": [
{
"ssid": "test",
"cipherType": "WEP",
"password": "1111111111",
"proxyType": "MANUAL",
"hostName": "https://www.test",
"port": 50
}
],
"outgoingCallsDisabled": true,
"passwordPolicies": {
"maximumFailedPasswordsForWipe": 1,
"passwordExpirationTimeout": "1s",
"passwordHistoryLength": 1,
"passwordMinimumLetters": 1,
"passwordMinimumLowerCase": 1,
"passwordMinimumNumeric": 1,
"passwordMinimumSymbols": 1,
"passwordMinimumUpperCase": 1,
"passwordQuality": "COMPLEX",
"requirePasswordUnlock": "REQUIRE_EVERY_DAY"
},
"permissionGrants": [
{
"permission": "android.permission-group.CALENDAR",
"policy": "PROMPT"
}
],
"permittedAccessibilityServices": {
"packageNames": [
"com.test"
]
},
"permittedInputMethods": {
"packageNames": [
"com.test"
]
},
"playStoreMode": "BLACKLIST",
"printingPolicy": "PRINTING_DISALLOWED",
"screenCaptureDisabled": true,
"setWallpaperDisabled": true,
"shareLocationDisabled": true,
"smsDisabled": true,
"stayOnPluggedModes": [
"USB"
],
"systemUpdate": {
"freezePeriods": [
{
"startDate": {
"month": 12,
"day": 3
},
"endDate": {
"month": 12,
"day": 14
}
}
],
"type": "AUTOMATIC"
},
"uninstallAppsDisabled": true,
"vpnConfigDisabled": true,
"deviceConnectivityManagement": {
"tetheringSettings": "DISALLOW_WIFI_TETHERING",
"usbDataAccess": "DISALLOW_USB_FILE_TRANSFER"
},
"deviceOwnerLockScreenInfo": "test",
"policyEnforcementRules": [
{
"blockAction": {
"blockAfterDays": 1
},
"settingName": "PASSWORD_POLICIES",
"wipeAction": {
"preserveFrp": true,
"wipeAfterDays": 2
}
}
],
"applications": [
{
"appId": 1646714366722087,
"packageName": "com.paperpile",
"autoUpdateMode": "AUTO_UPDATE_DEFAULT",
"defaultPermissionPolicy": "PROMPT",
"installPriority": "DEFAULT",
"installType": "AVAILABLE",
"lockFlag": false
}
]
},
"inheritFlag": false
}
}
The type in data is EmmPolicyDTO. The structure like below.
Property Name | Type | Description |
---|---|---|
customPolicyCount | Long | The custom policy count of EMM |
name | String | The name of EMM policy |
contentInfo | PolicyContentDTO | The content of EMM policy |
inheritFlag | Boolean | Whether inherit EMM policy |
Structure of class PolicyContentDTO
Property Name | Type | Description |
---|---|---|
adjustVolumeDisabled | Boolean | Whether adjusting the master volume is disabled. Also mutes the device |
advancedSecurityOverrides | AdvancedSecurityOverrides | Advanced security settings. In most cases, setting these is not needed |
alwaysOnVpnPackage | AlwaysOnVpnPackage | Configuration for an always-on VPN connection |
appAutoUpdatePolicy | String | Recommended alternative: autoUpdateMode which is set per app, provides greater flexibility around update frequency, value can be one of CHOICE_TO_THE_USER, NEVER, WIFI_ONLY, ALWAYS |
autoDateAndTimeZone | String | Whether auto date, time, and time zone are enabled on a company-owned device, value can be one of AUTO_DATE_AND_TIME_ZONE_USER_CHOICE, AUTO_DATE_AND_TIME_ZONE_ENFORCED |
bluetoothDisabled | Boolean | Whether bluetooth is disabled |
cameraAccess | String | Controls the use of the camera and whether the user has access to the camera access toggle, value can be one of CAMERA_ACCESS_USER_CHOICE, CAMERA_ACCESS_DISABLED, CAMERA_ACCESS_ENFORCED |
cellBroadcastsConfigDisabled | Boolean | Whether configuring cell broadcast is disabled |
dataRoamingDisabled | Boolean | Whether roaming data services are disabled |
deviceRadioState | DeviceRadioState | Covers controls for radio state such as Wi-Fi, bluetooth, and more |
encryptionPolicy | String | Whether encryption is enabled, value can be one of ENCRYPTION_POLICY_UNSPECIFIED, ENABLED_WITHOUT_PASSWORD, ENABLED_WITH_PASSWORD |
factoryResetDisabled | Boolean | Whether factory resetting from settings is disabled |
funDisabled | Boolean | Whether the user is allowed to have fun. Controls whether the Easter egg game in Settings is disabled |
installAppsDisabled | Boolean | Whether user installation of apps is disabled |
keyguardDisabledFeatures | List<String> | Disabled keyguard customizations, keyguardDisabledFeatures content can be any value of NOTIFICATIONS, UNREDACTED_NOTIFICATIONS, TRUST_AGENTS, DISABLE_FINGERPRINT, FACE, BIOMETRICS, SHORTCUTS, ALL_FEATURES |
locationMode | String | The degree of location detection enabled, value can be one of LOCATION_USER_CHOICE, LOCATION_ENFORCED, LOCATION_DISABLED |
maximumTimeToLock | Long | Maximum time in milliseconds for user activity until the device locks. A value of 0 means there is no restriction, value can be one of 0, 15000, 30000, 60000, 120000, 300000, 600000, 1800000 |
microphoneAccess | String | Controls the use of the microphone and whether the user has access to the microphone access toggle. This applies only on fully managed devices, value can be one of MICROPHONE_ACCESS_USER_CHOICE, MICROPHONE_ACCESS_DISABLED, MICROPHONE_ACCESS_ENFORCED |
minimumApiLevel | Integer | The minimum allowed Android API level |
mobileNetworksConfigDisabled | Boolean | Whether configuring mobile networks is disabled |
mountPhysicalMediaDisabled | Boolean | Whether the user mounting physical external media is disabled |
networkEscapeHatchEnabled | Boolean | Whether the user mounting physical external media is disabled |
networkResetDisabled | Boolean | Whether resetting network settings is disabled |
networkConfigurations | List<NetworkConfiguration> | Network configuration for the device |
outgoingCallsDisabled | Boolean | Whether outgoing calls are disabled |
passwordPolicies | PasswordRequirements | Password requirement policies. Different policies can be set for work profile or fully managed devices by setting the passwordScope field in the policy |
permissionGrants | List<PermissionGrant> | Explicit permission or group grants or denials for all apps |
permittedAccessibilityServices | PackageNameList | Specifies permitted accessibility services. If the field is not set, any accessibility service can be used. If the field is set, only the accessibility services in this list and the system's built-in accessibility service can be used. In particular, if the field is set to empty, only the system's built-in accessibility servicess can be used. This can be set on fully managed devices and on work profiles. When applied to a work profile, this affects both the personal profile and the work profile |
permittedInputMethods | PackageNameList | If present, only the input methods provided by packages in this list are permitted. If this field is present, but the list is empty, then only system input methods are permitted |
playStoreMode | String | This mode controls which apps are available to the user in the Play Store and the behavior on the device when apps are removed from the policy, value can be one of WHITELIST, BLACKLIST |
printingPolicy | String | Optional. Controls whether printing is allowed. This is supported on devices running Android 9 and above, value is PRINTING_DISALLOWED |
screenCaptureDisabled | Boolean | Whether screen capture is disabled |
setWallpaperDisabled | Boolean | Whether changing the wallpaper is disabled |
shareLocationDisabled | Boolean | Whether location sharing is disabled. shareLocationDisabled is supported for both fully managed devices and personally owned work profiles |
smsDisabled | Boolean | Whether sending and receiving SMS messages is disabled |
stayOnPluggedModes | List<String> | The battery plugged in modes for which the device stays on. When using this setting, it is recommended to clear maximumTimeToLock so that the device doesn't lock itself while it stays on, stayOnPluggedModes content can be any value of AC, USB, WIRELESS |
systemUpdate | SystemUpdate | The system update policy, which controls how OS updates are applied. If the update type is WINDOWED, the update window will automatically apply to Play app updates as well. Note: Google Play system updates (also called Mainline updates) are automatically downloaded and require a device reboot to be installed. Refer to the mainline section in Manage system updates for further details |
uninstallAppsDisabled | Boolean | Whether user uninstallation of applications is disabled. This prevents apps from being uninstalled, even those removed using applications |
vpnConfigDisabled | Boolean | Whether configuring VPN is disabled |
deviceConnectivityManagement | DeviceConnectivityManagement | Covers controls for device connectivity such as Wi-Fi, USB data access, keyboard/mouse connections, and more |
deviceOwnerLockScreenInfo | String | The device owner information to be shown on the lock screen |
policyEnforcementRules | List<PolicyEnforcementRule> | Rules that define the behavior when a particular policy can not be applied on device |
applications | List<ApplicationPolicy> | Policy applied to apps. This can have at most 100 elements |
Structure of class AdvancedSecurityOverrides
Property Name | Type | Description |
---|---|---|
developerSettings | String | Controls access to developer settings: developer options and safe boot, value can be one of DEVELOPER_SETTINGS_DISABLED, DEVELOPER_SETTINGS_ALLOWED |
googlePlayProtectVerifyApps | String | Whether Google Play Protect verification is enforced, value can be one of VERIFY_APPS_USER_CHOICE, VERIFY_APPS_ENFORCED |
untrustedAppsPolicy | String | The policy for untrusted apps (apps from unknown sources) enforced on the device, value can be one of DISALLOW_INSTALL, ALLOW_INSTALL_IN_PERSONAL_PROFILE_ONLY, ALLOW_INSTALL_DEVICE_WIDE |
Structure of class AlwaysOnVpnPackage
Property Name | Type | Description |
---|---|---|
lockdownEnabled | Boolean | Disallows networking when the VPN is not connected |
packageName | String | The package name of the VPN app |
Structure of class DeviceRadioState
Property Name | Type | Description |
---|---|---|
airplaneModeState | String | Controls whether airplane mode can be toggled by the user or not, value is AIRPLANE_MODE_DISABLED |
minimumWifiSecurityLevel | String | The minimum required security level of Wi-Fi networks that the device can connect to, value can be one of OPEN_NETWORK_SECURITY, PERSONAL_NETWORK_SECURITY, ENTERPRISE_NETWORK_SECURITY, ENTERPRISE_BIT192_NETWORK_SECURITY |
Structure of class NetworkConfiguration
Property Name | Type | Description |
---|---|---|
ssid | String | Wi-Fi SSID |
cipherType | String | Wi-Fi cipher type, value can be one of NONE, WEP, WPA_WPA2_PSK |
password | String | Wi-Fi password, for WEP password |
proxyType | String | Wi-Fi proxy type, value can be one of NONE, MANUAL, PAC |
hostName | String | Wi-Fi proxy host name |
port | Integer | Wi-Fi proxy port |
pacUrl | String | WIFI pac url |
Structure of class PasswordRequirements
Property Name | Type | Description |
---|---|---|
maximumFailedPasswordsForWipe | Integer | Number of incorrect device-unlock passwords that can be entered before a device is wiped. A value of 0 means there is no restriction |
passwordExpirationTimeout | String | Password expiration timeout. A duration in seconds with up to nine fractional digits, ending with 's' |
passwordHistoryLength | Integer | The length of the password history. After setting this field, the user won't be able to enter a new password that is the same as any password in the history. A value of 0 means there is no restriction |
passwordMinimumLength | Integer | The minimum allowed password length. A value of 0 means there is no restriction. Only enforced when passwordQuality is NUMERIC_COMPLEX, ALPHABETIC, ALPHANUMERIC, or COMPLEX |
passwordMinimumLetters | Integer | Minimum number of letters required in the password. Only enforced when passwordQuality is COMPLEX |
passwordMinimumLowerCase | Integer | Minimum number of lower case letters required in the password. Only enforced when passwordQuality is COMPLEX |
passwordMinimumNumeric | Integer | Minimum number of numerical digits required in the password. Only enforced when passwordQuality is COMPLEX |
passwordMinimumSymbols | Integer | Minimum number of symbols required in the password. Only enforced when passwordQuality is COMPLEX |
passwordMinimumUpperCase | Integer | Minimum number of upper case letters required in the password. Only enforced when passwordQuality is COMPLEX |
passwordQuality | String | The required password quality, value can be one of PASSWORD_QUALITY_UNSPECIFIED, SOMETHING, NUMERIC_COMPLEX, ALPHABETIC, ALPHANUMERIC, COMPLEX |
requirePasswordUnlock | String | The length of time after a device or work profile is unlocked using a strong form of authentication (password, PIN, pattern) that it can be unlocked using any other authentication method (e.g. fingerprint, trust agents, face). After the specified time period elapses, only strong forms of authentication can be used to unlock the device or work profile, value can be one of USE_DEFAULT_DEVICE_TIMEOUT, REQUIRE_EVERY_DAY |
Structure of class PermissionGrant
Property Name | Type | Description |
---|---|---|
permission | String | The Android permission or group, value can be one of android.permission-group.ACTIVITY_RECOGNITION, android.permission-group.CALENDAR, android.permission-group.CALL_LOG, android.permission-group.CAMERA, android.permission-group.CONTACTS, android.permission-group.LOCATION, android.permission-group.MICROPHONE, android.permission-group.NEARBY_DEVICES, android.permission-group.NOTIFICATIONS, android.permission-group.PHONE, android.permission-group.READ_MEDIA_AURAL, android.permission-group.READ_MEDIA_VISUAL, android.permission-group.SENSORS, android.permission-group.SMS, android.permission-group.STORAGE, android.permission.ACCEPT_HANDOVER, android.permission.ACCESS_BACKGROUND_LOCATION, android.permission.ACCESS_BLOBS_ACROSS_USERS, android.permission.ACCESS_CHECKIN_PROPERTIES, android.permission.ACCESS_COARSE_LOCATION, android.permission.ACCESS_FINE_LOCATION, android.permission.ACCESS_HIDDEN_PROFILES, android.permission.ACCESS_LOCATION_EXTRA_COMMANDS, android.permission.ACCESS_MEDIA_LOCATION, android.permission.ACCESS_NETWORK_STATE, android.permission.ACCESS_NOTIFICATION_POLICY, android.permission.ACCESS_WIFI_STATE, android.permission.ACCOUNT_MANAGER, android.permission.ACTIVITY_RECOGNITION, com.android.voicemail.permission.ADD_VOICEMAIL, android.permission.ANSWER_PHONE_CALLS, android.permission.BATTERY_STATS, android.permission.BIND_ACCESSIBILITY_SERVICE, android.permission.BIND_APPWIDGET, android.permission.BIND_AUTOFILL_SERVICE, android.permission.BIND_CALL_REDIRECTION_SERVICE, android.permission.BIND_CARRIER_MESSAGING_CLIENT_SERVICE, android.permission.BIND_CARRIER_MESSAGING_SERVICE, android.permission.BIND_CARRIER_SERVICES, android.permission.BIND_CHOOSER_TARGET_SERVICE, android.permission.BIND_COMPANION_DEVICE_SERVICE, android.permission.BIND_CONDITION_PROVIDER_SERVICE, android.permission.BIND_CONTROLS, android.permission.BIND_CREDENTIAL_PROVIDER_SERVICE, android.permission.BIND_DEVICE_ADMIN, android.permission.BIND_DREAM_SERVICE, android.permission.BIND_INCALL_SERVICE, android.permission.BIND_INPUT_METHOD, android.permission.BIND_MIDI_DEVICE_SERVICE, android.permission.BIND_NFC_SERVICE, android.permission.BIND_NOTIFICATION_LISTENER_SERVICE, android.permission.BIND_PRINT_SERVICE, android.permission.BIND_QUICK_ACCESS_WALLET_SERVICE, android.permission.BIND_QUICK_SETTINGS_TILE, android.permission.BIND_REMOTEVIEWS, android.permission.BIND_SCREENING_SERVICE, android.permission.BIND_TELECOM_CONNECTION_SERVICE, android.permission.BIND_TEXT_SERVICE, android.permission.BIND_TV_INPUT, android.permission.BIND_TV_INTERACTIVE_APP, android.permission.BIND_VISUAL_VOICEMAIL_SERVICE, android.permission.BIND_VOICE_INTERACTION, android.permission.BIND_VPN_SERVICE, android.permission.BIND_VR_LISTENER_SERVICE, android.permission.BIND_WALLPAPER, android.permission.BLUETOOTH, android.permission.BLUETOOTH_ADMIN, android.permission.BLUETOOTH_ADVERTISE, android.permission.BLUETOOTH_CONNECT, android.permission.BLUETOOTH_PRIVILEGED, android.permission.BLUETOOTH_SCAN, android.permission.BODY_SENSORS, android.permission.BODY_SENSORS_BACKGROUND, android.permission.BROADCAST_PACKAGE_REMOVED, android.permission.BROADCAST_SMS, android.permission.BROADCAST_STICKY, android.permission.BROADCAST_WAP_PUSH, android.permission.CALL_COMPANION_APP, android.permission.CALL_PHONE, android.permission.CALL_PRIVILEGED, android.permission.CAMERA, android.permission.CAPTURE_AUDIO_OUTPUT, android.permission.CHANGE_COMPONENT_ENABLED_STATE, android.permission.CHANGE_CONFIGURATION, android.permission.CHANGE_NETWORK_STATE, android.permission.CHANGE_WIFI_MULTICAST_STATE, android.permission.CHANGE_WIFI_STATE, android.permission.CLEAR_APP_CACHE, android.permission.CONFIGURE_WIFI_DISPLAY, android.permission.CONTROL_LOCATION_UPDATES, android.permission.CREDENTIAL_MANAGER_QUERY_CANDIDATE_CREDENTIALS, android.permission.CREDENTIAL_MANAGER_SET_ALLOWED_PROVIDERS, android.permission.CREDENTIAL_MANAGER_SET_ORIGIN, android.permission.DELETE_CACHE_FILES, android.permission.DELETE_PACKAGES, android.permission.DELIVER_COMPANION_MESSAGES, android.permission.DETECT_SCREEN_CAPTURE, android.permission.DETECT_SCREEN_RECORDING, android.permission.DIAGNOSTIC, android.permission.DISABLE_KEYGUARD, android.permission.DUMP, android.permission.ENFORCE_UPDATE_OWNERSHIP, android.permission.EXECUTE_APP_ACTION, android.permission.EXPAND_STATUS_BAR, android.permission.FACTORY_TEST, android.permission.FOREGROUND_SERVICE, android.permission.FOREGROUND_SERVICE_CAMERA, android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE, android.permission.FOREGROUND_SERVICE_DATA_SYNC, android.permission.FOREGROUND_SERVICE_HEALTH, android.permission.FOREGROUND_SERVICE_LOCATION, android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK, android.permission.FOREGROUND_SERVICE_MEDIA_PROCESSING, android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION, android.permission.FOREGROUND_SERVICE_MICROPHONE, android.permission.FOREGROUND_SERVICE_PHONE_CALL, android.permission.FOREGROUND_SERVICE_REMOTE_MESSAGING, android.permission.FOREGROUND_SERVICE_SPECIAL_USE, android.permission.FOREGROUND_SERVICE_SYSTEM_EXEMPTED, android.permission.GET_ACCOUNTS, android.permission.GET_ACCOUNTS_PRIVILEGED, android.permission.GET_PACKAGE_SIZE, android.permission.GET_TASKS, android.permission.GLOBAL_SEARCH, android.permission.HIDE_OVERLAY_WINDOWS, android.permission.HIGH_SAMPLING_RATE_SENSORS, android.permission.INSTALL_LOCATION_PROVIDER, android.permission.INSTALL_PACKAGES, com.android.launcher.permission.INSTALL_SHORTCUT, android.permission.INSTANT_APP_FOREGROUND_SERVICE, android.permission.INTERACT_ACROSS_PROFILES, android.permission.INTERNET, android.permission.KILL_BACKGROUND_PROCESSES, android.permission.LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE, android.permission.LAUNCH_MULTI_PANE_SETTINGS_DEEP_LINK, android.permission.LOADER_USAGE_STATS, android.permission.LOCATION_HARDWARE, android.permission.MANAGE_DEVICE_LOCK_STATE, android.permission.MANAGE_DOCUMENTS, android.permission.MANAGE_EXTERNAL_STORAGE, android.permission.MANAGE_MEDIA, android.permission.MANAGE_ONGOING_CALLS, android.permission.MANAGE_OWN_CALLS, android.permission.MANAGE_WIFI_INTERFACES, android.permission.MANAGE_WIFI_NETWORK_SELECTION, android.permission.MASTER_CLEAR, android.permission.MEDIA_CONTENT_CONTROL, android.permission.MEDIA_ROUTING_CONTROL, android.permission.MODIFY_AUDIO_SETTINGS, android.permission.MODIFY_PHONE_STATE, android.permission.MOUNT_FORMAT_FILESYSTEMS, android.permission.MOUNT_UNMOUNT_FILESYSTEMS, android.permission.NEARBY_WIFI_DEVICES, android.permission.NFC, android.permission.NFC_PREFERRED_PAYMENT_INFO, android.permission.NFC_TRANSACTION_EVENT, android.permission.OVERRIDE_WIFI_CONFIG, android.permission.PACKAGE_USAGE_STATS, android.permission.PERSISTENT_ACTIVITY, android.permission.POST_NOTIFICATIONS, android.permission.PROCESS_OUTGOING_CALLS, android.permission.PROVIDE_OWN_AUTOFILL_SUGGESTIONS, android.permission.PROVIDE_REMOTE_CREDENTIALS, android.permission.QUERY_ALL_PACKAGES, android.permission.READ_ASSISTANT_APP_SEARCH_DATA, android.permission.READ_BASIC_PHONE_STATE, android.permission.READ_CALENDAR, android.permission.READ_CALL_LOG, android.permission.READ_CONTACTS, android.permission.READ_DROPBOX_DATA, android.permission.READ_EXTERNAL_STORAGE, android.permission.READ_HOME_APP_SEARCH_DATA, android.permission.READ_LOGS, android.permission.READ_MEDIA_AUDIO, android.permission.READ_MEDIA_IMAGES, android.permission.READ_MEDIA_VIDEO, android.permission.READ_MEDIA_VISUAL_USER_SELECTED, android.permission.READ_NEARBY_STREAMING_POLICY, android.permission.READ_PHONE_NUMBERS, android.permission.READ_PHONE_STATE, android.permission.READ_PRECISE_PHONE_STATE, android.permission.READ_SMS, android.permission.READ_SYNC_SETTINGS, android.permission.READ_SYNC_STATS, com.android.voicemail.permission.READ_VOICEMAIL, android.permission.REBOOT, android.permission.RECEIVE_BOOT_COMPLETED, android.permission.RECEIVE_MMS, android.permission.RECEIVE_SMS, android.permission.RECEIVE_WAP_PUSH, android.permission.RECORD_AUDIO, android.permission.REORDER_TASKS, android.permission.REQUEST_COMPANION_PROFILE_APP_STREAMING, android.permission.REQUEST_COMPANION_PROFILE_AUTOMOTIVE_PROJECTION, android.permission.REQUEST_COMPANION_PROFILE_COMPUTER, android.permission.REQUEST_COMPANION_PROFILE_GLASSES, android.permission.REQUEST_COMPANION_PROFILE_NEARBY_DEVICE_STREAMING, android.permission.REQUEST_COMPANION_PROFILE_WATCH, android.permission.REQUEST_COMPANION_RUN_IN_BACKGROUND, android.permission.REQUEST_COMPANION_SELF_MANAGED, android.permission.REQUEST_COMPANION_START_FOREGROUND_SERVICES_FROM_BACKGROUND, android.permission.REQUEST_COMPANION_USE_DATA_IN_BACKGROUND, android.permission.REQUEST_DELETE_PACKAGES, android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS, android.permission.REQUEST_INSTALL_PACKAGES, android.permission.REQUEST_OBSERVE_COMPANION_DEVICE_PRESENCE, android.permission.REQUEST_PASSWORD_COMPLEXITY, android.permission.RUN_USER_INITIATED_JOBS, android.permission.SCHEDULE_EXACT_ALARM, android.permission.SEND_RESPOND_VIA_MESSAGE, android.permission.SEND_SMS, com.android.alarm.permission.SET_ALARM, android.permission.SET_ALWAYS_FINISH, android.permission.SET_ANIMATION_SCALE, android.permission.SET_BIOMETRIC_DIALOG_ADVANCED, android.permission.SET_DEBUG_APP, android.permission.SET_PROCESS_LIMIT, android.permission.SET_TIME, android.permission.SET_TIME_ZONE, android.permission.SET_WALLPAPER, android.permission.SET_WALLPAPER_HINTS, android.permission.SIGNAL_PERSISTENT_PROCESSES, android.permission.START_FOREGROUND_SERVICES_FROM_BACKGROUND, android.permission.START_VIEW_APP_FEATURES, android.permission.START_VIEW_PERMISSION_USAGE, android.permission.STATUS_BAR, android.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE, android.permission.SYSTEM_ALERT_WINDOW, android.permission.TRANSMIT_IR, android.permission.TURN_SCREEN_ON, com.android.launcher.permission.UNINSTALL_SHORTCUT, android.permission.UPDATE_DEVICE_STATS, android.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION, android.permission.USE_BIOMETRIC, android.permission.USE_EXACT_ALARM, android.permission.USE_FINGERPRINT, android.permission.USE_FULL_SCREEN_INTENT, android.permission.USE_ICC_AUTH_WITH_DEVICE_IDENTIFIER, android.permission.USE_SIP, android.permission.UWB_RANGING, android.permission.VIBRATE, android.permission.WAKE_LOCK, android.permission.WRITE_APN_SETTINGS, android.permission.WRITE_CALENDAR, android.permission.WRITE_CALL_LOG, android.permission.WRITE_CONTACTS, android.permission.WRITE_EXTERNAL_STORAGE, android.permission.WRITE_GSERVICES, android.permission.WRITE_SECURE_SETTINGS, android.permission.WRITE_SYNC_SETTINGS, com.android.voicemail.permission.WRITE_VOICEMAIL |
policy | String | The policy for granting the permission, value can be one of PROMPT, GRANT, DENY |
Structure of class PackageNameList
Property Name | Type | Description |
---|---|---|
packageNames | List<String> | A list of package names |
Structure of class SystemUpdate
Property Name | Type | Description |
---|---|---|
startMinutes | Integer | If the type is WINDOWED, the start of the maintenance window, measured as the number of minutes after midnight in the device's local time. This value must be between 0 and 1439, inclusive |
endMinutes | Integer | If the type is WINDOWED, the end of the maintenance window, measured as the number of minutes after midnight in device's local time. This value must be between 0 and 1439, inclusive. If this value is less than startMinutes, then the maintenance window spans midnight. If the maintenance window specified is smaller than 30 minutes, the actual window is extended to 30 minutes beyond the start time |
freezePeriods | List<FreezePeriod> | An annually repeating time period in which over-the-air (OTA) system updates are postponed to freeze the OS version running on a device. To prevent freezing the device indefinitely, each freeze period must be separated by at least 60 days. Note: If the type is not configured, this configuration item is invalid |
type | String | The type of system update to configure, value can be one of AUTOMATIC, WINDOWED, POSTPONE |
Structure of class FreezePeriod
Property Name | Type | Description |
---|---|---|
startDate | CustomDate | The start date (inclusive) of the freeze period. Note: year must not be set |
endDate | CustomDate | The end date (inclusive) of the freeze period. Must be no later than 90 days from the start date. If the end date is earlier than the start date, the freeze period is considered wrapping year-end. Note: year must not be set |
Structure of class CustomDate
Property Name | Type | Description |
---|---|---|
month | Integer | Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day |
day | Integer | Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant |
Structure of class DeviceConnectivityManagement
Property Name | Type | Description |
---|---|---|
tetheringSettings | String | Controls tethering settings. Based on the value set, the user is partially or fully disallowed from using different forms of tethering, value can be one of ALLOW_ALL_TETHERING, DISALLOW_WIFI_TETHERING, DISALLOW_ALL_TETHERING |
usbDataAccess | String | Controls what files and/or data can be transferred via USB. Supported only on company-owned devices, value can be one of ALLOW_USB_DATA_TRANSFER, DISALLOW_USB_FILE_TRANSFER, DISALLOW_USB_DATA_TRANSFER |
Structure of class DeviceConnectivityManagement
Property Name | Type | Description |
---|---|---|
tetheringSettings | String | Controls tethering settings. Based on the value set, the user is partially or fully disallowed from using different forms of tethering, value can be one of ALLOW_ALL_TETHERING, DISALLOW_WIFI_TETHERING, DISALLOW_ALL_TETHERING |
usbDataAccess | String | Controls what files and/or data can be transferred via USB. Supported only on company-owned devices, value can be one of ALLOW_USB_DATA_TRANSFER, DISALLOW_USB_FILE_TRANSFER, DISALLOW_USB_DATA_TRANSFER |
Structure of class PolicyEnforcementRule
Property Name | Type | Description |
---|---|---|
blockAction | BlockAction | An action to block access to apps and data on a company owned device or in a work profile. This action also triggers a user-facing notification with information (where possible) on how to correct the compliance issue. Note: wipeAction must also be specified |
settingName | String | The top-level policy to enforce, value can be one of PASSWORD_POLICIES, DEVICE_ENCRYPTION_POLICY, LOCK_SCREEN_KEYGUARD_DISABLED, INPUT_METHODS_SETTING, ACCESSIBILITY_SERVICES_SETTING, MINIMUM_API_LEVEL |
wipeAction | WipeAction | An action to reset a company owned device or delete a work profile. Note: blockAction must also be specified |
Structure of class BlockAction
Property Name | Type | Description |
---|---|---|
blockAfterDays | Integer | Number of days the policy is non-compliant before the device or work profile is blocked. To block access immediately, set to 0. blockAfterDays must be less than wipeAfterDays |
Structure of class WipeAction
Property Name | Type | Description |
---|---|---|
preserveFrp | Boolean | Whether the factory-reset protection data is preserved on the device. This setting doesn’t apply to work profiles |
wipeAfterDays | Integer | Number of days the policy is non-compliant before the device or work profile is wiped. wipeAfterDays must be greater than blockAfterDays |
Structure of class ApplicationPolicy
Property Name | Type | Description |
---|---|---|
appId | Long | The id of the emm app |
packageName | String | The package name of the emm app |
autoUpdateMode | String | Controls the auto-update mode for the app, value can be one of AUTO_UPDATE_DEFAULT, AUTO_UPDATE_POSTPONED, AUTO_UPDATE_HIGH_PRIORITY |
defaultPermissionPolicy | String | The default policy for all permissions requested by the app. If specified, this overrides the policy-level defaultPermissionPolicy which applies to all apps. It does not override the permissionGrants which applies to all apps, value can be one of PROMPT, GRANT, DENY |
installPriority | String | this controls the relative priority of installation, value can be one of DEFAULT, HIGH_PRIORITY, MEDIUM_PRIORITY, LOW_PRIORITY, default value is DEFAULT |
installType | String | The type of installation to perform, value can be one of FORCE_INSTALLED, PREINSTALLED, AVAILABLE, BLOCKED, KIOSK, REQUIRED_FOR_SETUP |
lockFlag | Boolean | Whether the policy application is locked, default value is false |
lockedByReseller | String | The name of the reseller whose policy application is locked |
permissionGrants | List<AppPermissionGrant> | Explicit permission grants or denials for the app. These values override the defaultPermissionPolicy and permissionGrants which apply to all apps |
Structure of class AppPermissionGrant
Property Name | Type | Description |
---|---|---|
permission | String | The Android permission or group, each application has different permission groups, the value can be obtained by calling the getEmmAppPermissionList API |
policy | String | The policy for granting the permission, value can be one of PROMPT, GRANT, DENY |
Possible client validation errors
Parameter resellerName cannot be null! Parameter resellerName is too long, maxlength is 64! Parameter merchantName cannot be null! Parameter merchantName is too long, maxlength is 64!
Possible business codes
Business Code | Message | Description |
---|---|---|
998 | Bad request | |
1720 | Merchant doesn't exist | |
1723 | Merchant name is mandatory | |
1729 | Merchant name is too long | |
1759 | Reseller doesn't exist | |
1762 | Reseller name is mandatory | |
1767 | Reseller name is too long |
Create merchant EMM policy API allow the thirdparty system create merchant EMM policy remotely.
API
public Result<String> createMerchantEmmPolicy(MerchantEmmPolicyCreateRequest merchantEmmPolicyCreateRequest)
Input parameter(s) description
Name | Type | Nullable | Description |
---|---|---|---|
merchantEmmPolicyCreateRequest | MerchantEmmPolicyCreateRequest | false | The request object. The structure shows below |
Structure of class MerchantEmmPolicyCreateRequest
Property Name | Type | Nullable | Description |
---|---|---|---|
resellerName | String | false | The reseller of EMM device belongs to. Max length is 64 |
merchantName | String | false | The merchant of EMM device belongs to. Max length is 64 |
contentInfo | PolicyUpdatedContentDTO | true | The content of EMM policy. When inheritFlag is true, the contentInfo value can be ignored, and when inheritFlag is false, the contentInfo value is required |
inheritFlag | Boolean | false | Whether inherit EMM policy |
Structure of class PolicyUpdatedContentDTO
Property Name | Type | Nullable | Description |
---|---|---|---|
adjustVolumeDisabled | Boolean | true | Whether adjusting the master volume is disabled. Also mutes the device |
advancedSecurityOverrides | AdvancedSecurityOverrides | true | Advanced security settings. In most cases, setting these is not needed |
alwaysOnVpnPackage | AlwaysOnVpnPackage | true | Configuration for an always-on VPN connection |
appAutoUpdatePolicy | String | true | Recommended alternative: autoUpdateMode which is set per app, provides greater flexibility around update frequency, value can be one of CHOICE_TO_THE_USER, NEVER, WIFI_ONLY, ALWAYS |
autoDateAndTimeZone | String | true | Whether auto date, time, and time zone are enabled on a company-owned device, value can be one of AUTO_DATE_AND_TIME_ZONE_USER_CHOICE, AUTO_DATE_AND_TIME_ZONE_ENFORCED |
bluetoothDisabled | Boolean | true | Whether bluetooth is disabled |
cameraAccess | String | true | Controls the use of the camera and whether the user has access to the camera access toggle, value can be one of CAMERA_ACCESS_USER_CHOICE, CAMERA_ACCESS_DISABLED, CAMERA_ACCESS_ENFORCED |
cellBroadcastsConfigDisabled | Boolean | true | Whether configuring cell broadcast is disabled |
dataRoamingDisabled | Boolean | true | Whether roaming data services are disabled |
deviceRadioState | DeviceRadioState | true | Covers controls for radio state such as Wi-Fi, bluetooth, and more |
encryptionPolicy | String | true | Whether encryption is enabled, value can be one of ENCRYPTION_POLICY_UNSPECIFIED, ENABLED_WITHOUT_PASSWORD, ENABLED_WITH_PASSWORD |
factoryResetDisabled | Boolean | true | Whether factory resetting from settings is disabled |
funDisabled | Boolean | true | Whether the user is allowed to have fun. Controls whether the Easter egg game in Settings is disabled |
installAppsDisabled | Boolean | true | Whether user installation of apps is disabled |
keyguardDisabledFeatures | List<String> | true | Disabled keyguard customizations, keyguardDisabledFeatures content can be any value of NOTIFICATIONS, UNREDACTED_NOTIFICATIONS, TRUST_AGENTS, DISABLE_FINGERPRINT, FACE, BIOMETRICS, SHORTCUTS, ALL_FEATURES |
locationMode | String | true | The degree of location detection enabled, value can be one of LOCATION_USER_CHOICE, LOCATION_ENFORCED, LOCATION_DISABLED |
maximumTimeToLock | Long | true | Maximum time in milliseconds for user activity until the device locks. A value of 0 means there is no restriction, value can be one of 0, 15000, 30000, 60000, 120000, 300000, 600000, 1800000 |
microphoneAccess | String | true | Controls the use of the microphone and whether the user has access to the microphone access toggle. This applies only on fully managed devices, value can be one of MICROPHONE_ACCESS_USER_CHOICE, MICROPHONE_ACCESS_DISABLED, MICROPHONE_ACCESS_ENFORCED |
minimumApiLevel | Integer | true | The minimum allowed Android API level, the range of values is 1 to 999999 |
mobileNetworksConfigDisabled | Boolean | true | Whether configuring mobile networks is disabled |
mountPhysicalMediaDisabled | Boolean | true | Whether the user mounting physical external media is disabled |
networkEscapeHatchEnabled | Boolean | true | Whether the user mounting physical external media is disabled |
networkResetDisabled | Boolean | true | Whether resetting network settings is disabled |
networkConfigurations | List<NetworkConfiguration> | true | Network configuration for the device |
outgoingCallsDisabled | Boolean | true | Whether outgoing calls are disabled |
passwordPolicies | PasswordRequirements | true | Password requirement policies. Different policies can be set for work profile or fully managed devices by setting the passwordScope field in the policy |
permissionGrants | List<PermissionGrant> | true | Explicit permission or group grants or denials for all apps |
permittedAccessibilityServices | PackageNameList | true | Specifies permitted accessibility services. If the field is not set, any accessibility service can be used. If the field is set, only the accessibility services in this list and the system's built-in accessibility service can be used. In particular, if the field is set to empty, only the system's built-in accessibility servicess can be used. This can be set on fully managed devices and on work profiles. When applied to a work profile, this affects both the personal profile and the work profile |
permittedInputMethods | PackageNameList | true | If present, only the input methods provided by packages in this list are permitted. If this field is present, but the list is empty, then only system input methods are permitted |
playStoreMode | String | true | This mode controls which apps are available to the user in the Play Store and the behavior on the device when apps are removed from the policy, value can be one of WHITELIST, BLACKLIST |
printingPolicy | String | true | Optional. Controls whether printing is allowed. This is supported on devices running Android 9 and above, value is PRINTING_DISALLOWED |
screenCaptureDisabled | Boolean | true | Whether screen capture is disabled |
setWallpaperDisabled | Boolean | true | Whether changing the wallpaper is disabled |
shareLocationDisabled | Boolean | true | Whether location sharing is disabled. shareLocationDisabled is supported for both fully managed devices and personally owned work profiles |
smsDisabled | Boolean | true | Whether sending and receiving SMS messages is disabled |
stayOnPluggedModes | List<String> | true | The battery plugged in modes for which the device stays on. When using this setting, it is recommended to clear maximumTimeToLock so that the device doesn't lock itself while it stays on, stayOnPluggedModes content can be any value of AC, USB, WIRELESS |
systemUpdate | SystemUpdate | true | The system update policy, which controls how OS updates are applied. If the update type is WINDOWED, the update window will automatically apply to Play app updates as well. Note: Google Play system updates (also called Mainline updates) are automatically downloaded and require a device reboot to be installed. Refer to the mainline section in Manage system updates for further details |
uninstallAppsDisabled | Boolean | true | Whether user uninstallation of applications is disabled. This prevents apps from being uninstalled, even those removed using applications |
vpnConfigDisabled | Boolean | true | Whether configuring VPN is disabled |
deviceConnectivityManagement | DeviceConnectivityManagement | true | Covers controls for device connectivity such as Wi-Fi, USB data access, keyboard/mouse connections, and more |
deviceOwnerLockScreenInfo | String | true | The device owner information to be shown on the lock screen, max length is 255 |
policyEnforcementRules | List<PolicyEnforcementRule> | true | Rules that define the behavior when a particular policy can not be applied on device |
applications | List<ApplicationPolicy> | true | Policy applied to apps. This can have at most 100 elements |
Structure of class AdvancedSecurityOverrides
Property Name | Type | Nullable | Description |
---|---|---|---|
developerSettings | String | true | Controls access to developer settings: developer options and safe boot, value can be one of DEVELOPER_SETTINGS_DISABLED, DEVELOPER_SETTINGS_ALLOWED |
googlePlayProtectVerifyApps | String | true | Whether Google Play Protect verification is enforced, value can be one of VERIFY_APPS_USER_CHOICE, VERIFY_APPS_ENFORCED |
untrustedAppsPolicy | String | true | The policy for untrusted apps (apps from unknown sources) enforced on the device, value can be one of DISALLOW_INSTALL, ALLOW_INSTALL_IN_PERSONAL_PROFILE_ONLY, ALLOW_INSTALL_DEVICE_WIDE |
Structure of class AlwaysOnVpnPackage
Property Name | Type | Nullable | Description |
---|---|---|---|
lockdownEnabled | Boolean | true | Disallows networking when the VPN is not connected |
packageName | String | true | The package name of the VPN app, max length is 128 |
Structure of class DeviceRadioState
Property Name | Type | Nullable | Description |
---|---|---|---|
airplaneModeState | String | true | Controls whether airplane mode can be toggled by the user or not, value is AIRPLANE_MODE_DISABLED |
minimumWifiSecurityLevel | String | true | The minimum required security level of Wi-Fi networks that the device can connect to, value can be one of OPEN_NETWORK_SECURITY, PERSONAL_NETWORK_SECURITY, ENTERPRISE_NETWORK_SECURITY, ENTERPRISE_BIT192_NETWORK_SECURITY |
Structure of class NetworkConfiguration
Property Name | Type | Nullable | Description |
---|---|---|---|
ssid | String | true | Wi-Fi SSID, max length is 32 |
cipherType | String | true | Wi-Fi cipher type, value can be one of NONE, WEP, WPA_WPA2_PSK |
password | String | true | Wi-Fi password, for WEP password, the password length is 10 or 26, for WPA_WPA2_PSK password, the password length range is 8 to 63 |
proxyType | String | true | Wi-Fi proxy type, value can be one of NONE, MANUAL, PAC |
hostName | String | true | Wi-Fi proxy host name |
port | Integer | true | Wi-Fi proxy port, The range of values is 1 to 65535 |
pacUrl | String | true | WIFI pac url |
Structure of class PasswordRequirements
Property Name | Type | Nullable | Description |
---|---|---|---|
maximumFailedPasswordsForWipe | Integer | true | Number of incorrect device-unlock passwords that can be entered before a device is wiped. A value of 0 means there is no restriction, the range of values is 0 to 9999 |
passwordExpirationTimeout | String | true | Password expiration timeout. A duration in seconds with up to nine fractional digits, ending with 's', the range of values is 0 to 99999999999 |
passwordHistoryLength | Integer | true | The length of the password history. After setting this field, the user won't be able to enter a new password that is the same as any password in the history. A value of 0 means there is no restriction, the range of values is 0 to 9999 |
passwordMinimumLength | Integer | true | The minimum allowed password length. A value of 0 means there is no restriction. Only enforced when passwordQuality is NUMERIC_COMPLEX, ALPHABETIC, ALPHANUMERIC, or COMPLEX, the range of values is 4 to 16 |
passwordMinimumLetters | Integer | true | Minimum number of letters required in the password. Only enforced when passwordQuality is COMPLEX, the range of values is 0 to 99 |
passwordMinimumLowerCase | Integer | true | Minimum number of lower case letters required in the password. Only enforced when passwordQuality is COMPLEX, the range of values is 0 to 99 |
passwordMinimumNumeric | Integer | true | Minimum number of numerical digits required in the password. Only enforced when passwordQuality is COMPLEX, the range of values is 0 to 99 |
passwordMinimumSymbols | Integer | true | Minimum number of symbols required in the password. Only enforced when passwordQuality is COMPLEX, the range of values is 0 to 99 |
passwordMinimumUpperCase | Integer | true | Minimum number of upper case letters required in the password. Only enforced when passwordQuality is COMPLEX, the range of values is 0 to 99 |
passwordQuality | String | true | The required password quality, value can be one of PASSWORD_QUALITY_UNSPECIFIED, SOMETHING, NUMERIC_COMPLEX, ALPHABETIC, ALPHANUMERIC, COMPLEX |
requirePasswordUnlock | String | true | The length of time after a device or work profile is unlocked using a strong form of authentication (password, PIN, pattern) that it can be unlocked using any other authentication method (e.g. fingerprint, trust agents, face). After the specified time period elapses, only strong forms of authentication can be used to unlock the device or work profile, value can be one of USE_DEFAULT_DEVICE_TIMEOUT, REQUIRE_EVERY_DAY |
Structure of class PermissionGrant
Property Name | Type | Nullable | Description |
---|---|---|---|
permission | String | true | The Android permission or group, value can be one of android.permission-group.ACTIVITY_RECOGNITION, android.permission-group.CALENDAR, android.permission-group.CALL_LOG, android.permission-group.CAMERA, android.permission-group.CONTACTS, android.permission-group.LOCATION, android.permission-group.MICROPHONE, android.permission-group.NEARBY_DEVICES, android.permission-group.NOTIFICATIONS, android.permission-group.PHONE, android.permission-group.READ_MEDIA_AURAL, android.permission-group.READ_MEDIA_VISUAL, android.permission-group.SENSORS, android.permission-group.SMS, android.permission-group.STORAGE, android.permission.ACCEPT_HANDOVER, android.permission.ACCESS_BACKGROUND_LOCATION, android.permission.ACCESS_BLOBS_ACROSS_USERS, android.permission.ACCESS_CHECKIN_PROPERTIES, android.permission.ACCESS_COARSE_LOCATION, android.permission.ACCESS_FINE_LOCATION, android.permission.ACCESS_HIDDEN_PROFILES, android.permission.ACCESS_LOCATION_EXTRA_COMMANDS, android.permission.ACCESS_MEDIA_LOCATION, android.permission.ACCESS_NETWORK_STATE, android.permission.ACCESS_NOTIFICATION_POLICY, android.permission.ACCESS_WIFI_STATE, android.permission.ACCOUNT_MANAGER, android.permission.ACTIVITY_RECOGNITION, com.android.voicemail.permission.ADD_VOICEMAIL, android.permission.ANSWER_PHONE_CALLS, android.permission.BATTERY_STATS, android.permission.BIND_ACCESSIBILITY_SERVICE, android.permission.BIND_APPWIDGET, android.permission.BIND_AUTOFILL_SERVICE, android.permission.BIND_CALL_REDIRECTION_SERVICE, android.permission.BIND_CARRIER_MESSAGING_CLIENT_SERVICE, android.permission.BIND_CARRIER_MESSAGING_SERVICE, android.permission.BIND_CARRIER_SERVICES, android.permission.BIND_CHOOSER_TARGET_SERVICE, android.permission.BIND_COMPANION_DEVICE_SERVICE, android.permission.BIND_CONDITION_PROVIDER_SERVICE, android.permission.BIND_CONTROLS, android.permission.BIND_CREDENTIAL_PROVIDER_SERVICE, android.permission.BIND_DEVICE_ADMIN, android.permission.BIND_DREAM_SERVICE, android.permission.BIND_INCALL_SERVICE, android.permission.BIND_INPUT_METHOD, android.permission.BIND_MIDI_DEVICE_SERVICE, android.permission.BIND_NFC_SERVICE, android.permission.BIND_NOTIFICATION_LISTENER_SERVICE, android.permission.BIND_PRINT_SERVICE, android.permission.BIND_QUICK_ACCESS_WALLET_SERVICE, android.permission.BIND_QUICK_SETTINGS_TILE, android.permission.BIND_REMOTEVIEWS, android.permission.BIND_SCREENING_SERVICE, android.permission.BIND_TELECOM_CONNECTION_SERVICE, android.permission.BIND_TEXT_SERVICE, android.permission.BIND_TV_INPUT, android.permission.BIND_TV_INTERACTIVE_APP, android.permission.BIND_VISUAL_VOICEMAIL_SERVICE, android.permission.BIND_VOICE_INTERACTION, android.permission.BIND_VPN_SERVICE, android.permission.BIND_VR_LISTENER_SERVICE, android.permission.BIND_WALLPAPER, android.permission.BLUETOOTH, android.permission.BLUETOOTH_ADMIN, android.permission.BLUETOOTH_ADVERTISE, android.permission.BLUETOOTH_CONNECT, android.permission.BLUETOOTH_PRIVILEGED, android.permission.BLUETOOTH_SCAN, android.permission.BODY_SENSORS, android.permission.BODY_SENSORS_BACKGROUND, android.permission.BROADCAST_PACKAGE_REMOVED, android.permission.BROADCAST_SMS, android.permission.BROADCAST_STICKY, android.permission.BROADCAST_WAP_PUSH, android.permission.CALL_COMPANION_APP, android.permission.CALL_PHONE, android.permission.CALL_PRIVILEGED, android.permission.CAMERA, android.permission.CAPTURE_AUDIO_OUTPUT, android.permission.CHANGE_COMPONENT_ENABLED_STATE, android.permission.CHANGE_CONFIGURATION, android.permission.CHANGE_NETWORK_STATE, android.permission.CHANGE_WIFI_MULTICAST_STATE, android.permission.CHANGE_WIFI_STATE, android.permission.CLEAR_APP_CACHE, android.permission.CONFIGURE_WIFI_DISPLAY, android.permission.CONTROL_LOCATION_UPDATES, android.permission.CREDENTIAL_MANAGER_QUERY_CANDIDATE_CREDENTIALS, android.permission.CREDENTIAL_MANAGER_SET_ALLOWED_PROVIDERS, android.permission.CREDENTIAL_MANAGER_SET_ORIGIN, android.permission.DELETE_CACHE_FILES, android.permission.DELETE_PACKAGES, android.permission.DELIVER_COMPANION_MESSAGES, android.permission.DETECT_SCREEN_CAPTURE, android.permission.DETECT_SCREEN_RECORDING, android.permission.DIAGNOSTIC, android.permission.DISABLE_KEYGUARD, android.permission.DUMP, android.permission.ENFORCE_UPDATE_OWNERSHIP, android.permission.EXECUTE_APP_ACTION, android.permission.EXPAND_STATUS_BAR, android.permission.FACTORY_TEST, android.permission.FOREGROUND_SERVICE, android.permission.FOREGROUND_SERVICE_CAMERA, android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE, android.permission.FOREGROUND_SERVICE_DATA_SYNC, android.permission.FOREGROUND_SERVICE_HEALTH, android.permission.FOREGROUND_SERVICE_LOCATION, android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK, android.permission.FOREGROUND_SERVICE_MEDIA_PROCESSING, android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION, android.permission.FOREGROUND_SERVICE_MICROPHONE, android.permission.FOREGROUND_SERVICE_PHONE_CALL, android.permission.FOREGROUND_SERVICE_REMOTE_MESSAGING, android.permission.FOREGROUND_SERVICE_SPECIAL_USE, android.permission.FOREGROUND_SERVICE_SYSTEM_EXEMPTED, android.permission.GET_ACCOUNTS, android.permission.GET_ACCOUNTS_PRIVILEGED, android.permission.GET_PACKAGE_SIZE, android.permission.GET_TASKS, android.permission.GLOBAL_SEARCH, android.permission.HIDE_OVERLAY_WINDOWS, android.permission.HIGH_SAMPLING_RATE_SENSORS, android.permission.INSTALL_LOCATION_PROVIDER, android.permission.INSTALL_PACKAGES, com.android.launcher.permission.INSTALL_SHORTCUT, android.permission.INSTANT_APP_FOREGROUND_SERVICE, android.permission.INTERACT_ACROSS_PROFILES, android.permission.INTERNET, android.permission.KILL_BACKGROUND_PROCESSES, android.permission.LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE, android.permission.LAUNCH_MULTI_PANE_SETTINGS_DEEP_LINK, android.permission.LOADER_USAGE_STATS, android.permission.LOCATION_HARDWARE, android.permission.MANAGE_DEVICE_LOCK_STATE, android.permission.MANAGE_DOCUMENTS, android.permission.MANAGE_EXTERNAL_STORAGE, android.permission.MANAGE_MEDIA, android.permission.MANAGE_ONGOING_CALLS, android.permission.MANAGE_OWN_CALLS, android.permission.MANAGE_WIFI_INTERFACES, android.permission.MANAGE_WIFI_NETWORK_SELECTION, android.permission.MASTER_CLEAR, android.permission.MEDIA_CONTENT_CONTROL, android.permission.MEDIA_ROUTING_CONTROL, android.permission.MODIFY_AUDIO_SETTINGS, android.permission.MODIFY_PHONE_STATE, android.permission.MOUNT_FORMAT_FILESYSTEMS, android.permission.MOUNT_UNMOUNT_FILESYSTEMS, android.permission.NEARBY_WIFI_DEVICES, android.permission.NFC, android.permission.NFC_PREFERRED_PAYMENT_INFO, android.permission.NFC_TRANSACTION_EVENT, android.permission.OVERRIDE_WIFI_CONFIG, android.permission.PACKAGE_USAGE_STATS, android.permission.PERSISTENT_ACTIVITY, android.permission.POST_NOTIFICATIONS, android.permission.PROCESS_OUTGOING_CALLS, android.permission.PROVIDE_OWN_AUTOFILL_SUGGESTIONS, android.permission.PROVIDE_REMOTE_CREDENTIALS, android.permission.QUERY_ALL_PACKAGES, android.permission.READ_ASSISTANT_APP_SEARCH_DATA, android.permission.READ_BASIC_PHONE_STATE, android.permission.READ_CALENDAR, android.permission.READ_CALL_LOG, android.permission.READ_CONTACTS, android.permission.READ_DROPBOX_DATA, android.permission.READ_EXTERNAL_STORAGE, android.permission.READ_HOME_APP_SEARCH_DATA, android.permission.READ_LOGS, android.permission.READ_MEDIA_AUDIO, android.permission.READ_MEDIA_IMAGES, android.permission.READ_MEDIA_VIDEO, android.permission.READ_MEDIA_VISUAL_USER_SELECTED, android.permission.READ_NEARBY_STREAMING_POLICY, android.permission.READ_PHONE_NUMBERS, android.permission.READ_PHONE_STATE, android.permission.READ_PRECISE_PHONE_STATE, android.permission.READ_SMS, android.permission.READ_SYNC_SETTINGS, android.permission.READ_SYNC_STATS, com.android.voicemail.permission.READ_VOICEMAIL, android.permission.REBOOT, android.permission.RECEIVE_BOOT_COMPLETED, android.permission.RECEIVE_MMS, android.permission.RECEIVE_SMS, android.permission.RECEIVE_WAP_PUSH, android.permission.RECORD_AUDIO, android.permission.REORDER_TASKS, android.permission.REQUEST_COMPANION_PROFILE_APP_STREAMING, android.permission.REQUEST_COMPANION_PROFILE_AUTOMOTIVE_PROJECTION, android.permission.REQUEST_COMPANION_PROFILE_COMPUTER, android.permission.REQUEST_COMPANION_PROFILE_GLASSES, android.permission.REQUEST_COMPANION_PROFILE_NEARBY_DEVICE_STREAMING, android.permission.REQUEST_COMPANION_PROFILE_WATCH, android.permission.REQUEST_COMPANION_RUN_IN_BACKGROUND, android.permission.REQUEST_COMPANION_SELF_MANAGED, android.permission.REQUEST_COMPANION_START_FOREGROUND_SERVICES_FROM_BACKGROUND, android.permission.REQUEST_COMPANION_USE_DATA_IN_BACKGROUND, android.permission.REQUEST_DELETE_PACKAGES, android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS, android.permission.REQUEST_INSTALL_PACKAGES, android.permission.REQUEST_OBSERVE_COMPANION_DEVICE_PRESENCE, android.permission.REQUEST_PASSWORD_COMPLEXITY, android.permission.RUN_USER_INITIATED_JOBS, android.permission.SCHEDULE_EXACT_ALARM, android.permission.SEND_RESPOND_VIA_MESSAGE, android.permission.SEND_SMS, com.android.alarm.permission.SET_ALARM, android.permission.SET_ALWAYS_FINISH, android.permission.SET_ANIMATION_SCALE, android.permission.SET_BIOMETRIC_DIALOG_ADVANCED, android.permission.SET_DEBUG_APP, android.permission.SET_PROCESS_LIMIT, android.permission.SET_TIME, android.permission.SET_TIME_ZONE, android.permission.SET_WALLPAPER, android.permission.SET_WALLPAPER_HINTS, android.permission.SIGNAL_PERSISTENT_PROCESSES, android.permission.START_FOREGROUND_SERVICES_FROM_BACKGROUND, android.permission.START_VIEW_APP_FEATURES, android.permission.START_VIEW_PERMISSION_USAGE, android.permission.STATUS_BAR, android.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE, android.permission.SYSTEM_ALERT_WINDOW, android.permission.TRANSMIT_IR, android.permission.TURN_SCREEN_ON, com.android.launcher.permission.UNINSTALL_SHORTCUT, android.permission.UPDATE_DEVICE_STATS, android.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION, android.permission.USE_BIOMETRIC, android.permission.USE_EXACT_ALARM, android.permission.USE_FINGERPRINT, android.permission.USE_FULL_SCREEN_INTENT, android.permission.USE_ICC_AUTH_WITH_DEVICE_IDENTIFIER, android.permission.USE_SIP, android.permission.UWB_RANGING, android.permission.VIBRATE, android.permission.WAKE_LOCK, android.permission.WRITE_APN_SETTINGS, android.permission.WRITE_CALENDAR, android.permission.WRITE_CALL_LOG, android.permission.WRITE_CONTACTS, android.permission.WRITE_EXTERNAL_STORAGE, android.permission.WRITE_GSERVICES, android.permission.WRITE_SECURE_SETTINGS, android.permission.WRITE_SYNC_SETTINGS, com.android.voicemail.permission.WRITE_VOICEMAIL |
policy | String | true | The policy for granting the permission, value can be one of PROMPT, GRANT, DENY |
Structure of class PackageNameList
Property Name | Type | Nullable | Description |
---|---|---|---|
packageNames | List<String> | true | A list of package names, the elements in the list can contain multiple package names, separated by commas. The maximum length of each element is 255, and the maximum length of separated package names in elements is 128 |
Structure of class SystemUpdate
Property Name | Type | Nullable | Description |
---|---|---|---|
startMinutes | Integer | true | If the type is WINDOWED, the start of the maintenance window, measured as the number of minutes after midnight in the device's local time. This value must be between 0 and 1439, inclusive |
endMinutes | Integer | true | If the type is WINDOWED, the end of the maintenance window, measured as the number of minutes after midnight in device's local time. This value must be between 0 and 1439, inclusive. If this value is less than startMinutes, then the maintenance window spans midnight. If the maintenance window specified is smaller than 30 minutes, the actual window is extended to 30 minutes beyond the start time |
freezePeriods | List<FreezePeriod> | true | An annually repeating time period in which over-the-air (OTA) system updates are postponed to freeze the OS version running on a device. To prevent freezing the device indefinitely, each freeze period must be separated by at least 60 days. Note: If the type is not configured, this configuration item is invalid |
type | String | true | The type of system update to configure, value can be one of AUTOMATIC, WINDOWED, POSTPONE |
Structure of class FreezePeriod
Property Name | Type | Nullable | Description |
---|---|---|---|
startDate | CustomDate | true | The start date (inclusive) of the freeze period. Note: year must not be set |
endDate | CustomDate | true | The end date (inclusive) of the freeze period. Must be no later than 90 days from the start date. If the end date is earlier than the start date, the freeze period is considered wrapping year-end. Note: year must not be set |
Structure of class CustomDate
Property Name | Type | Nullable | Description |
---|---|---|---|
month | Integer | true | Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day |
day | Integer | true | Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant |
Structure of class DeviceConnectivityManagement
Property Name | Type | Nullable | Description |
---|---|---|---|
tetheringSettings | String | true | Controls tethering settings. Based on the value set, the user is partially or fully disallowed from using different forms of tethering, value can be one of ALLOW_ALL_TETHERING, DISALLOW_WIFI_TETHERING, DISALLOW_ALL_TETHERING |
usbDataAccess | String | true | Controls what files and/or data can be transferred via USB. Supported only on company-owned devices, value can be one of ALLOW_USB_DATA_TRANSFER, DISALLOW_USB_FILE_TRANSFER, DISALLOW_USB_DATA_TRANSFER |
Structure of class DeviceConnectivityManagement
Property Name | Type | Nullable | Description |
---|---|---|---|
tetheringSettings | String | true | Controls tethering settings. Based on the value set, the user is partially or fully disallowed from using different forms of tethering, value can be one of ALLOW_ALL_TETHERING, DISALLOW_WIFI_TETHERING, DISALLOW_ALL_TETHERING |
usbDataAccess | String | true | Controls what files and/or data can be transferred via USB. Supported only on company-owned devices, value can be one of ALLOW_USB_DATA_TRANSFER, DISALLOW_USB_FILE_TRANSFER, DISALLOW_USB_DATA_TRANSFER |
Structure of class PolicyEnforcementRule
Property Name | Type | Nullable | Description |
---|---|---|---|
blockAction | BlockAction | true | An action to block access to apps and data on a company owned device or in a work profile. This action also triggers a user-facing notification with information (where possible) on how to correct the compliance issue. Note: wipeAction must also be specified |
settingName | String | true | The top-level policy to enforce, value can be one of PASSWORD_POLICIES, DEVICE_ENCRYPTION_POLICY, LOCK_SCREEN_KEYGUARD_DISABLED, INPUT_METHODS_SETTING, ACCESSIBILITY_SERVICES_SETTING, MINIMUM_API_LEVEL |
wipeAction | WipeAction | true | An action to reset a company owned device or delete a work profile. Note: blockAction must also be specified |
Structure of class BlockAction
Property Name | Type | Nullable | Description |
---|---|---|---|
blockAfterDays | Integer | true | Number of days the policy is non-compliant before the device or work profile is blocked. To block access immediately, set to 0. blockAfterDays must be less than wipeAfterDays, the range of values is 0 to 30 |
Structure of class WipeAction
Property Name | Type | Nullable | Description |
---|---|---|---|
preserveFrp | Boolean | true | Whether the factory-reset protection data is preserved on the device. This setting doesn’t apply to work profiles |
wipeAfterDays | Integer | true | Number of days the policy is non-compliant before the device or work profile is wiped. wipeAfterDays must be greater than blockAfterDays, the range of values is 0 to 30 |
Structure of class ApplicationPolicy
Property Name | Type | Nullable | Description |
---|---|---|---|
packageName | String | true | The package name of the emm app, max length is 128 |
autoUpdateMode | String | true | Controls the auto-update mode for the app, value can be one of AUTO_UPDATE_DEFAULT, AUTO_UPDATE_POSTPONED, AUTO_UPDATE_HIGH_PRIORITY |
defaultPermissionPolicy | String | true | The default policy for all permissions requested by the app. If specified, this overrides the policy-level defaultPermissionPolicy which applies to all apps. It does not override the permissionGrants which applies to all apps, value can be one of PROMPT, GRANT, DENY |
installPriority | String | true | this controls the relative priority of installation, value can be one of DEFAULT, HIGH_PRIORITY, MEDIUM_PRIORITY, LOW_PRIORITY, default value is DEFAULT |
installType | String | true | The type of installation to perform, value can be one of FORCE_INSTALLED, PREINSTALLED, AVAILABLE, BLOCKED, KIOSK, REQUIRED_FOR_SETUP |
lockFlag | Boolean | true | Whether the policy application is locked, default value is false |
permissionGrants | List<AppPermissionGrant> | true | Explicit permission grants or denials for the app. These values override the defaultPermissionPolicy and permissionGrants which apply to all apps |
Structure of class AppPermissionGrant
Property Name | Type | Nullable | Description |
---|---|---|---|
permission | String | true | The Android permission or group, each application has different permission groups, the value can be obtained by calling the getEmmAppPermissionList API |
policy | String | true | The policy for granting the permission, value can be one of PROMPT, GRANT, DENY |
Sample codes
EmmAppApi emmAppApi = new EmmAppApi("https://api.whatspos.com/p-market-api", "RCA9MDH6YN3WSSGPW6TJ", "TUNLDZVZECHNKZ4FW07XFCKN2W0N8ZDEA5ENKZYN");
MerchantEmmPolicyCreateRequest request = new MerchantEmmPolicyCreateRequest();
request.setResellerName("PAX");
request.setMerchantName("test");
PolicyUpdatedContentDTO policyUpdatedContentDTO = new PolicyUpdatedContentDTO();
policyUpdatedContentDTO.setAdjustVolumeDisabled(Boolean.TRUE);
request.setContentInfo(policyUpdatedContentDTO);
request.setInheritFlag(Boolean.FALSE);
Result<String> result = emmPolicyApi.createMerchantEmmPolicy(request);
Client side validation failed sample result(JSON formatted)
{
"businessCode": -1,
"validationErrors": ["Parameter merchantName cannot be null!"]
}
Server side validation failed sample result(JSON formatted)
{
"businessCode": 1720,
"message": "Merchant doesn't exist"
}
Successful sample result
{
"businessCode": 0,
}
Possible client validation errors
Parameter merchantEmmPolicyCreateRequest cannot be null! Parameter resellerName cannot be null! Parameter resellerName is too long, maxlength is 64! Parameter merchantName cannot be null! Parameter merchantName is too long, maxlength is 64! Parameter contentInfo cannot be null! Parameter inheritFlag cannot be null!
Possible business codes
Business Code | Message | Description |
---|---|---|
113 | Your request is invalid, please try again or contact marketplace administrator | |
1720 | Merchant doesn't exist | |
1723 | Merchant name is mandatory | |
1729 | Merchant name is too long | |
1759 | Reseller doesn't exist | |
1762 | Reseller name is mandatory | |
1767 | Reseller name is too long | |
61606 | Unable to override the policy,the current marketplace cannot have more than {0} customized policies | |
61607 | Up to {0} applications can be locked in a policy | |
61609 | Adding application failed. Exceeded {0} limit. | |
61610 | Action failed. Only one app in the policy can be installed in Kiosk mode | |
61636 | {0} applications do not exist | |
61645 | Locked application policies cannot be operated | |
61651 | EMM application configuration is invalid | |
61654 | EMM for Android not subscribed | |
61655 | EMM for Android not distributed | |
61656 | The market is not bound to EMM for Android | |
61660 | EMM app package name is mandatory | |
61661 | EMM app package name is too long | |
61663 | {0} is invalid | |
61664 | Merchants are not allowed to lock policy applications |