The Android Management API allows IT admins to remotely set and enforce default
applications on managed devices or profiles. This enhances device security by
preventing users from switching to less secure apps for critical functions like
dialing, SMS, and browsing, thereby reducing risks like phishing and data
exfiltration.

Once an admin sets a default application policy, end-users are prevented from
changing any default app settings on the specified profile.

> [!CAUTION]
> **Caution:** Don't configure \[\`defaultApplicationSettings\`\] and \[\`persistentPreferredActivities\`\] for the same intent domain, such as web browsing. Setting both for the same intent domain can lead to unpredictable behavior.

## Policy configuration

Default applications can be configured by adding one or more
[`DefaultApplicationSetting`](https://developers.google.com/android/management/reference/rest/v1/enterprises.policies#DefaultApplicationSetting) objects to the [`defaultApplicationSettings`](https://developers.google.com/android/management/reference/rest/v1/enterprises.policies#Policy.FIELDS.default_application_settings)
field in the policy. Each setting object targets a specific application type
and can be applied to different [scopes](https://developers.google.com/android/management/default-application-settings#define_scopes).

### Set the default apps

For each [`DefaultApplicationType`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationType), a prioritized list of apps can be provided
in the [`defaultApplications`](https://developers.google.com/android/management/reference/rest/v1/enterprises.policies#DefaultApplicationSetting.FIELDS.default_applications) field. The API will set the first app from the
list that is installed on the device and qualified for the app type as the
default.

For a non-system app to be set as the default, its signing key
certificate fingerprint on the device must match the fingerprint obtained from
the Google Play Store or one of the entries in
[`ApplicationPolicy.signingKeyCerts`](https://developers.google.com/android/management/reference/rest/v1/enterprises.policies#ApplicationPolicy.FIELDS.signing_key_certs).

### Define scopes

The [`defaultApplicationScopes`](https://developers.google.com/android/management/reference/rest/v1/enterprises.policies#DefaultApplicationSetting.FIELDS.default_application_scopes) field determines where the policy is applied.
The available scopes are:

- [`SCOPE_FULLY_MANAGED`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationScope#ENUM_VALUES.SCOPE_FULLY_MANAGED): Applies to fully managed devices.
- [`SCOPE_WORK_PROFILE`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationScope#ENUM_VALUES.SCOPE_WORK_PROFILE): Applies to the work profile on company-owned or personally-owned devices.
- [`SCOPE_PERSONAL_PROFILE`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationScope#ENUM_VALUES.SCOPE_PERSONAL_PROFILE): Applies to the personal profile on company-owned devices.

When setting a default app for the [`SCOPE_FULLY_MANAGED`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationScope#ENUM_VALUES.SCOPE_FULLY_MANAGED) or
[`SCOPE_WORK_PROFILE`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationScope#ENUM_VALUES.SCOPE_WORK_PROFILE), the application must have a corresponding entry in the
[`applications`](https://developers.google.com/android/management/reference/rest/v1/enterprises.policies#Policy.FIELDS.applications) policy. The [`installType`](https://developers.google.com/android/management/reference/rest/v1/enterprises.policies#ApplicationPolicy.FIELDS.install_type) for that app must not be
[`BLOCKED`](https://developers.google.com/android/management/reference/rest/v1/enterprises.policies#InstallType.ENUM_VALUES.BLOCKED).

When targeting the [`SCOPE_PERSONAL_PROFILE`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationScope#ENUM_VALUES.SCOPE_PERSONAL_PROFILE), the policy is restricted to
setting only pre-installed system apps as the default.

### Cross-profile roles

Some roles, like [`DEFAULT_WALLET`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationType#ENUM_VALUES.DEFAULT_WALLET), apply across profiles on a device. For
these roles on a company-owned device with a work profile, an admin can choose
to set a default app in either the work profile or the personal profile, but not
both simultaneously.

## Management mode and Android version

Support for this feature varies by the device's management mode and Android
version.

| Management mode | Android 14 - 15 | Android 16+ |
|---|---|---|
| **Fully managed** | [`DEFAULT_DIALER`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationType#ENUM_VALUES.DEFAULT_DIALER) only | All app types supported. |
| **Company-owned device with work profile** | Not supported | **Work profile** : [`DEFAULT_BROWSER`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationType#ENUM_VALUES.DEFAULT_BROWSER), [`DEFAULT_CALL_REDIRECTION`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationType#ENUM_VALUES.DEFAULT_CALL_REDIRECTION), [`DEFAULT_CALL_SCREENING`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationType#ENUM_VALUES.DEFAULT_CALL_SCREENING), [`DEFAULT_DIALER`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationType#ENUM_VALUES.DEFAULT_DIALER), and [`DEFAULT_WALLET`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationType#ENUM_VALUES.DEFAULT_WALLET). **Personal profile** : [`DEFAULT_BROWSER`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationType#ENUM_VALUES.DEFAULT_BROWSER), [`DEFAULT_DIALER`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationType#ENUM_VALUES.DEFAULT_DIALER), [`DEFAULT_SMS`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationType#ENUM_VALUES.DEFAULT_SMS), and [`DEFAULT_WALLET`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationType#ENUM_VALUES.DEFAULT_WALLET). |
| **Personally owned device with work profile** | Not supported | **Work profile** : [`DEFAULT_BROWSER`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationType#ENUM_VALUES.DEFAULT_BROWSER), [`DEFAULT_CALL_REDIRECTION`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationType#ENUM_VALUES.DEFAULT_CALL_REDIRECTION), [`DEFAULT_CALL_SCREENING`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationType#ENUM_VALUES.DEFAULT_CALL_SCREENING), and [`DEFAULT_DIALER`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationType#ENUM_VALUES.DEFAULT_DIALER). **Personal profile**: Not supported |

## Non-compliance reporting

If the policy cannot be applied, the device reports a non-compliance (see
[`NonComplianceDetail`](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices#NonComplianceDetail)). Common reasons for non-compliance include:

- **Unsupported device or configuration** : A non-compliance with reason [`API_LEVEL`](https://developers.google.com/android/management/reference/rest/v1/NonComplianceReason#ENUM_VALUES.API_LEVEL) or [`MANAGEMENT_MODE`](https://developers.google.com/android/management/reference/rest/v1/NonComplianceReason#ENUM_VALUES.MANAGEMENT_MODE) is reported if the feature is not supported on the device's Android version or for its management mode.
- **Unsupported scopes** : If none of the scopes specified in the policy are applicable to the device's management mode (e.g., a policy with only [`SCOPE_PERSONAL_PROFILE`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationScope#ENUM_VALUES.SCOPE_PERSONAL_PROFILE) is sent to a fully managed device), a non-compliance is reported with reason [`MANAGEMENT_MODE`](https://developers.google.com/android/management/reference/rest/v1/NonComplianceReason#ENUM_VALUES.MANAGEMENT_MODE) and the specific reason [`DEFAULT_APPLICATION_SETTING_UNSUPPORTED_SCOPES`](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices#SpecificNonComplianceReason.ENUM_VALUES.DEFAULT_APPLICATION_SETTING_UNSUPPORTED_SCOPES).
- **App not installed** : For fully managed devices and work profiles, if *none* of the applications in the prioritized list are installed on the device, a non-compliance with reason [`APP_NOT_INSTALLED`](https://developers.google.com/android/management/reference/rest/v1/NonComplianceReason#ENUM_VALUES.APP_NOT_INSTALLED) is reported.
- **Invalid value** : If at least one app is installed but the default application settings fail to apply due to other reasons (e.g. the app is not of the right type), a non-compliance with reason [`INVALID_VALUE`](https://developers.google.com/android/management/reference/rest/v1/NonComplianceReason#ENUM_VALUES.INVALID_VALUE) is reported.
- **Personal profile failure** : For the personal profile, a generic [`INVALID_VALUE`](https://developers.google.com/android/management/reference/rest/v1/NonComplianceReason#ENUM_VALUES.INVALID_VALUE) non-compliance is reported if it fails to apply for any reason, without disclosing the installation status of the personal apps.

## Default application status reporting

Starting with Android 16, device status reports include
[`defaultApplicationInfo`](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices#Device.FIELDS.default_application_info). This field provides details about the current
default applications and the results of policy application attempts. To enable
this reporting, set the [`defaultApplicationInfoReportingEnabled`](https://developers.google.com/android/management/reference/rest/v1/enterprises.policies#StatusReportingSettings.FIELDS.default_application_info_reporting_enabled) flag to
`true` in [`StatusReportingSettings`](https://developers.google.com/android/management/reference/rest/v1/enterprises.policies#StatusReportingSettings).

- **Fully managed devices:** Reports cover all application types.
- **Devices with work profiles:** Reports only include application types supported for the work profile.

Each application type in the report includes the following details:

- [`packageName`](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices#DefaultApplicationInfo.FIELDS.package_name): Indicates the current default application for this type. It could be an application set by the policy, the system default, or the one chosen by the user. If this field is not reported, no default application is set for this type.
- [`defaultApplicationSettingAttempts`](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices#DefaultApplicationInfo.FIELDS.default_application_setting_attempts): Lists the outcomes of default application setting attempts for each app specified in the policy. This helps admins understand why applications with higher priority in the list might not have been set as the default.

## Example policy

Here is an example policy that sets the default browser and dialer. Applications
are added to the `applications` policy as the scope contains
[`SCOPE_FULLY_MANAGED`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationScope#ENUM_VALUES.SCOPE_FULLY_MANAGED) or [`SCOPE_WORK_PROFILE`](https://developers.google.com/android/management/reference/rest/v1/DefaultApplicationScope#ENUM_VALUES.SCOPE_WORK_PROFILE).
`defaultApplicationInfoReportingEnabled` is set to `true` to enable the
reporting.

    {
      "applications": [
        {
          "packageName": "com.android.chrome",
          "installType": "AVAILABLE"
        },
        {
          "packageName": "com.google.android.dialer",
          "installType": "AVAILABLE"
        },
        {
          "packageName": "com.samsung.android.dialer",
          "installType": "AVAILABLE"
        }
      ],
      "statusReportingSettings": {
        "defaultApplicationInfoReportingEnabled": true
      },
      "defaultApplicationSettings": [
        {
          "defaultApplicationType": "DEFAULT_BROWSER",
          "defaultApplications": [
            {
              "packageName": "com.android.chrome"
            }
          ],
          "defaultApplicationScopes": [
            "SCOPE_FULLY_MANAGED",
            "SCOPE_WORK_PROFILE"
          ]
        },
        {
          "defaultApplicationType": "DEFAULT_DIALER",
          "defaultApplications": [
            {
              "packageName": "com.google.android.dialer"
            },
            {
              "packageName": "com.samsung.android.dialer"
            }
          ],
          "defaultApplicationScopes": [
            "SCOPE_FULLY_MANAGED",
            "SCOPE_WORK_PROFILE",
            "SCOPE_PERSONAL_PROFILE"
          ]
        }
      ]
    }