Android.App.Admin Namespace

Provides device administration features at the system level, for apps that let IT administrators control and secure devices in enterprise environments.

Classes

Name Description
ConnectEvent

A class that represents a TCP connect event initiated through the standard network stack.

DelegatedAdminReceiver

Base class for delegated apps to handle callbacks related to their delegated capabilities.

DeviceAdminInfo

This class is used to specify meta information of a device administrator component.

DeviceAdminInfo.InterfaceConsts

Exposes the constants inherited from IParcelable by DeviceAdminInfo.

DeviceAdminReceiver

Base class for implementing a device administration component.

DeviceAdminService

Base class for a service that device owner/profile owners can optionally have.

DevicePolicyIdentifiers

Class containing identifiers for policy APIs in DevicePolicyManager, for example they will be passed in PolicyUpdateReceiver#onPolicySetResult and PolicyUpdateReceiver#onPolicyChanged to communicate updates of a certain policy back to the admin.

DevicePolicyManager

Manages device policy and restrictions applied to the user of the device or apps running on the device.

DevicePolicyManager.ClearApplicationUserDataEventArgs

Provides the values that the system sends to OnApplicationUserDataCleared(String, Boolean).

DevicePolicyManager.InstallSystemUpdateCallback

Callback used in #installSystemUpdate to indicate that there was an error while trying to install an update.

DevicePolicyResources

Class containing the required identifiers to update device management resources.

DevicePolicyResourcesManager

Class containing required APIs to set, reset, and get device policy related resources.

DnsEvent

A class that represents a DNS lookup event initiated through the standard network stack.

FactoryResetProtectionPolicy

The factory reset protection policy determines which accounts can unlock a device that has gone through untrusted factory reset.

FactoryResetProtectionPolicy.Builder

Builder class for FactoryResetProtectionPolicy objects.

FactoryResetProtectionPolicy.InterfaceConsts

Exposes the constants inherited from IParcelable by FactoryResetProtectionPolicy.

FreezePeriod

A class that represents one freeze period which repeats <em>annually</em>.

ManagedSubscriptionsPolicy

A policy class that describes how managed SIM subscriptions should behave on the device.

ManagedSubscriptionsPolicy.InterfaceConsts

Exposes the constants inherited from IParcelable by ManagedSubscriptionsPolicy.

NetworkEvent

An abstract class that represents a network event.

NetworkEvent.InterfaceConsts

Exposes the constants inherited from IParcelable by NetworkEvent.

PackageIdentifier

Identifies a package on the current device.

PackagePolicy

A generic class that defines which APK packages are in scope for some device policy.

PackagePolicy.InterfaceConsts

Exposes the constants inherited from IParcelable by PackagePolicy.

PolicyIdentifier

Represents a type safe identifier for a policy.

PolicyUpdateReceiver

Base class for implementing a policy update receiver.

PolicyUpdateResult

Class containing the reason for the policy (set from DevicePolicyManager) update (e.

PreferentialNetworkServiceConfig

Network configuration to be set for the user profile.

PreferentialNetworkServiceConfig.Builder

Builder used to create PreferentialNetworkServiceConfig objects.

PreferentialNetworkServiceConfig.InterfaceConsts

Exposes the constants inherited from IParcelable by PreferentialNetworkServiceConfig.

SecurityLog

Definitions for working with security logs.

SecurityLog.SecurityEvent

A class representing a security event log entry.

SecurityLog.SecurityEvent.InterfaceConsts

Exposes the constants inherited from IParcelable by SecurityLog.SecurityEvent.

SystemUpdateInfo

A class containing information about a pending system update.

SystemUpdateInfo.InterfaceConsts

Exposes the constants inherited from IParcelable by SystemUpdateInfo.

SystemUpdatePolicy

Determines when over-the-air system updates are installed on a device.

SystemUpdatePolicy.InterfaceConsts

Exposes the constants inherited from IParcelable by SystemUpdatePolicy.

SystemUpdatePolicy.ValidationFailedException

An exception class that represents various validation errors thrown from SystemUpdatePolicy#setFreezePeriods and DevicePolicyManager#setSystemUpdatePolicy

SystemUpdatePolicy.ValidationFailedException.InterfaceConsts

Exposes the constants inherited from IParcelable by SystemUpdatePolicy.ValidationFailedException.

TargetUser

Class representing the target user of a policy set by an admin (set from DevicePolicyManager), this is passed in to PolicyUpdateReceiver#onPolicySetResult and PolicyUpdateReceiver#onPolicyChanged.

UnsafeStateException

Exception thrown when a android.app.admin.DevicePolicyManager operation failed because it was not safe to be executed at that moment.

UnsafeStateException.InterfaceConsts

Exposes the constants inherited from IParcelable by UnsafeStateException.

WifiSsidPolicy

Used to indicate the Wi-Fi SSID restriction policy the network must satisfy in order to be eligible for a connection.

WifiSsidPolicy.InterfaceConsts

Exposes the constants inherited from IParcelable by WifiSsidPolicy.

Interfaces

Name Description
DevicePolicyManager.IOnClearApplicationUserDataListener

Callback used in #clearApplicationUserData to indicate that the clearing of an application's user data is done.

Enums

Name Description
BugReportFailureReason

Identifies why a requested bug report failed. The system passes one of these values to OnBugreportFailed(Context, Intent, BugReportFailureReason).

ContentProtectionPolicy

Identifies whether device policy controls content protection and, if it does, whether content protection is enabled or disabled.

DeviceAdminUses

Identifies a type of policy that a device admin can use. UsesPolicy(DeviceAdminUses) and HasGrantedPolicy(ComponentName, DeviceAdminUses) take one of these values.

DevicePolicyManagerAppFunctionsStatus

Identifies whether device policy controls app functions in the current user, and which app function interactions the policy disables.

DevicePolicyManagerAutoTimeStatus

Identifies the auto time state that device policy sets, or shows that device policy does not control auto time.

DevicePolicyManagerAutoTimeZoneStatus

Identifies the auto time zone state that device policy sets, or shows that device policy does not control auto time zone.

DevicePolicyManagerFlags

Enumerates values returned by several types and taken as a parameter of the F:Android.App.Admin.DevicePolicyManager.AddCrossProfileIntentFilter member.

DevicePolicyManagerScope

Identifies the scope of a policy: the current user, the entire device, or the parent user of the current user.

EncryptionStatus

Enumerates values returned by several types.

ExtraResourceType

Identifies the type of a device policy resource that was updated.

HeadlessDeviceOwnerMode

Identifies how a device policy controller is provisioned into device owner mode on a device that runs in Headless System User Mode.

IdAttestationFlags

Specifies which device details the attestation of a generated key pair includes, and whether the attestation uses an individual attestation certificate.

InstallKeyFlags

Specifies options for a private key and certificate chain that InstallKeyPair(ComponentName, IPrivateKey, Certificate[], String, InstallKeyFlags) installs.

KeyguardDisable

Enumerates values returned by several types and taken as a parameter of the F:Android.App.Admin.DevicePolicyManager.SetKeyguardDisabledFeatures member.

LockTaskFeatures

Specifies which configurable System UI features are available during LockTask mode.

ManagedSubscriptionsType

Identifies whether the device has only personal subscriptions or only managed subscriptions.

MteMode

Identifies whether device policy requires the Memory Tagging Extension (MTE) to be enabled or disabled, or lets the user choose.

NearbyStreaming

Identifies the policy for nearby streaming of apps or notifications.

OperationSafetyReason

Identifies why an operation is unsafe, as reported by UnsafeStateException.

PackagePolicyMode

Identifies how a PackagePolicy interprets its package names: as a blocklist, as an allowlist, or as an allowlist that also allows system packages.

PasswordComplexity

Identifies a password complexity band: none, low, medium, or high.

PasswordQuality

Identifies a password quality that a device admin can require with SetPasswordQuality(ComponentName, PasswordQuality).

PermissionGrantState

Identifies the grant state of a runtime permission for an app, as used by GetPermissionGrantState(ComponentName, String, String) and SetPermissionGrantState(ComponentName, String, String, PermissionGrantState).

PermissionPolicy

Identifies how the system handles new requests for runtime permissions, as used by GetPermissionPolicy(ComponentName) and SetPermissionPolicy(ComponentName, PermissionPolicy).

PersonalAppsDevicePolicy

Identifies why personal apps are suspended on a device that has an organization-owned managed profile.

PolicyUpdateResultCode

Identifies the result of a policy update for an admin, such as success, a cleared policy, or a failure reason.

PreferentialNetworkId

Identifies one of the five preferential network identifiers that a preferential network service configuration can use.

PrivateDnsMode

Identifies the global Private DNS mode of the device.

PrivateDnsSet

Identifies the result of a request to set the global Private DNS mode.

ResetPasswordFlags

Enumerates values returned by the ResetPasswordRequireEntry, and RequireEntry members and taken as a parameter of the F:Android.App.Admin.DevicePolicyManager.ResetPassword member.

SecurityLogLevel

Identifies the severity level of a security log event.

SecurityLogTags

Identifies the type of a security log event. The Tag property returns one of these values, and each value defines the contents of the Data property.

SecurityPatchStates

Identifies whether a system update is a security patch, as reported by the SecurityPatchState property.

SystemUpdatePolicyErrorCode

Identifies why a system update policy, or its freeze periods, failed validation.

SystemUpdatePolicyType

Identifies how a system update policy installs or postpones system updates, as returned by the PolicyType property.

UpdateErrorCode

Identifies why the installation of a system update failed.

UserManagementFlags

Specifies options for a user that CreateAndManageUser(ComponentName, String, ComponentName, PersistableBundle, UserManagementFlags) creates. Combine these flags as necessary.

WifiSecurity

Identifies a minimum Wi-Fi security level that device policy can require.

WifiSsidPolicyType

Identifies whether a WifiSsidPolicy is an allowlist or a denylist of Wi-Fi SSIDs.

WipeDataFlags

Enumerates values returned by the WipeExternalStorage, None, and WipeExternalStorage members and taken as a parameter of the F:Android.App.Admin.DevicePolicyManager.WipeData member.