roleType property

String? roleType
getter/setter pair

The type of the role an app can have.

Required. Possible string values are:

  • "ROLE_TYPE_UNSPECIFIED" : The role type is unspecified. This value must not be used.
  • "COMPANION_APP" : The role type for companion apps. This role enables the app as a companion app with the capability of interacting with Android Device Policy offline. This is the recommended way to configure an app as a companion app. For legacy way, see extensionConfig.On Android 14 and above, the app with this role is exempted from power and background execution restrictions, suspension and hibernation. On Android 11 and above, the user control is disallowed for the app with this role. userControlSettings cannot be set to USER_CONTROL_ALLOWED for the app with this role.Android Device Policy notifies the companion app of any local command status updates if the app has a service with . See Integrate with the AMAPI SDK (https://developers.google.com/android/management/sdk-integration) guide for more details on the requirements for the service.
  • "KIOSK" : The role type for kiosk apps. An app can have this role only if it has installType set to REQUIRED_FOR_SETUP or CUSTOM. Before adding this role to an app with CUSTOM install type, the app must already be installed on the device.The app having this role type is set as the preferred home intent and allowlisted for lock task mode. When there is an app with this role type, status bar will be automatically disabled.This is preferable to setting installType to KIOSK.On Android 11 and above, the user control is disallowed but userControlSettings can be set to USER_CONTROL_ALLOWED to allow user control for the app with this role.
  • "MOBILE_THREAT_DEFENSE_ENDPOINT_DETECTION_RESPONSE" : The role type for Mobile Threat Defense (MTD) / Endpoint Detection & Response (EDR) apps.On Android 14 and above, the app with this role is exempted from power and background execution restrictions, suspension and hibernation. On Android 11 and above, the user control is disallowed and userControlSettings cannot be set to USER_CONTROL_ALLOWED for the app with this role.
  • "SYSTEM_HEALTH_MONITORING" : The role type for system health monitoring apps.On Android 14 and above, the app with this role is exempted from power and background execution restrictions, suspension and hibernation. On Android 11 and above, the user control is disallowed and userControlSettings cannot be set to USER_CONTROL_ALLOWED for the app with this role.

Implementation

core.String? roleType;