Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#constants) \| [Inherited Constants](https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#inhconstants) \| [Fields](https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#lfields) \| [Ctors](https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#pubctors) \| [Methods](https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#inhmethods)

# DeviceAdminInfo

*** ** * ** ***


`
public

final

class
DeviceAdminInfo
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


implements

https://developer.android.com/reference/android/os/Parcelable


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.admin.DeviceAdminInfo |

<br />

*** ** * ** ***

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

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#HEADLESS_DEVICE_OWNER_MODE_AFFILIATED` Value for `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#getHeadlessDeviceOwnerMode()` which indicates that this DPC should be provisioned into "affiliated" mode when on a Headless System User Mode device. |
| `int` | `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#HEADLESS_DEVICE_OWNER_MODE_SINGLE_USER` Value for `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#getHeadlessDeviceOwnerMode()` which indicates that this DPC should be provisioned into the first secondary user when on a Headless System User Mode device. |
| `int` | `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#HEADLESS_DEVICE_OWNER_MODE_UNSUPPORTED` Value for `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#getHeadlessDeviceOwnerMode()` which indicates that this DPC should not be provisioned into Device Owner mode on a Headless System User Mode device. |
| `int` | `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#USES_ENCRYPTED_STORAGE` A type of policy that this device admin can use: require encryption of stored data. |
| `int` | `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#USES_POLICY_DISABLE_CAMERA` A type of policy that this device admin can use: disables use of all device cameras. |
| `int` | `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#USES_POLICY_DISABLE_KEYGUARD_FEATURES` A type of policy that this device admin can use: disables use of keyguard features. |
| `int` | `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#USES_POLICY_EXPIRE_PASSWORD` A type of policy that this device admin can use: force the user to change their password after an administrator-defined time limit. |
| `int` | `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#USES_POLICY_FORCE_LOCK` A type of policy that this device admin can use: able to force the device to lock via`https://developer.android.com/reference/android/app/admin/DevicePolicyManager#lockNow()` or limit the maximum lock timeout for the device via `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setMaximumTimeToLock(android.content.ComponentName,%20long)`. |
| `int` | `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#USES_POLICY_LIMIT_PASSWORD` A type of policy that this device admin can use: limit the passwords that the user can select, via `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setPasswordQuality(android.content.ComponentName,%20int)` and `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setPasswordMinimumLength(android.content.ComponentName,%20int)`. |
| `int` | `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#USES_POLICY_RESET_PASSWORD` A type of policy that this device admin can use: able to reset the user's password via `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#resetPassword(java.lang.String,%20int)`. |
| `int` | `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#USES_POLICY_WATCH_LOGIN` A type of policy that this device admin can use: able to watch login attempts from the user, via `https://developer.android.com/reference/android/app/admin/DeviceAdminReceiver#ACTION_PASSWORD_FAILED`, `https://developer.android.com/reference/android/app/admin/DeviceAdminReceiver#ACTION_PASSWORD_SUCCEEDED`, and `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#getCurrentFailedPasswordAttempts()`. |
| `int` | `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#USES_POLICY_WIPE_DATA` A type of policy that this device admin can use: able to factory reset the device, erasing all of the user's data, via `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#wipeData(int)`. |

### Inherited constants

From interface `https://developer.android.com/reference/android/os/Parcelable` `int` `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR`

Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that
the Parcelable object's flattened representation includes a file descriptor.


`int` `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`

Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written
is a return value, that is the result of a function such as
"`Parcelable someFunction()`",
"`void someFunction(out Parcelable)`", or
"`void someFunction(inout Parcelable)`".


| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/app/admin/DeviceAdminInfo>` | `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#CREATOR` Used to make this class parcelable. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#DeviceAdminInfo(android.content.Context,%20android.content.pm.ResolveInfo)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/content/pm/ResolveInfo resolveInfo) ` Constructor. |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` void` | ` https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#dump(android.util.Printer,%20java.lang.String)(https://developer.android.com/reference/android/util/Printer pw, https://developer.android.com/reference/java/lang/String prefix) ` |
| ` https://developer.android.com/reference/android/content/pm/ActivityInfo` | ` https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#getActivityInfo()() ` Return the raw information about the receiver implementing this device admin. |
| ` https://developer.android.com/reference/android/content/ComponentName` | ` https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#getComponent()() ` Return the component of the receiver that implements this device admin. |
| ` int` | ` https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#getHeadlessDeviceOwnerMode()() ` Returns the mode this DeviceAdmin wishes to use if provisioned as a Device Owner on a headless system user mode device. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#getPackageName()() ` Return the .apk package that implements this device admin. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#getReceiverName()() ` Return the class name of the receiver component that implements this device admin. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#getTagForPolicy(int)(int policyIdent) ` Return the XML tag name for the given policy identifier. |
| ` boolean` | ` https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#isVisible()() ` Returns whether this device admin would like to be visible to the user, even when it is not enabled. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#loadDescription(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) ` Load user-visible description associated with this device admin. |
| ` https://developer.android.com/reference/android/graphics/drawable/Drawable` | ` https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#loadIcon(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) ` Load the user-displayed icon for this device admin. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#loadLabel(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) ` Load the user-displayed label for this device admin. |
| ` boolean` | ` https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#supportsTransferOwnership()() ` Return true if this administrator can be a target in an ownership transfer. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#toString()() ` Returns a string representation of the object. |
| ` boolean` | ` https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#usesPolicy(int)(int policyIdent) ` Return true if the device admin has requested that it be able to use the given policy control. |
| ` void` | ` https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Used to package this object into a `https://developer.android.com/reference/android/os/Parcel`. |

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


From interface `

https://developer.android.com/reference/android/os/Parcelable

` `
abstract


int` `
https://developer.android.com/reference/android/os/Parcelable#describeContents()()
`

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.


`
abstract


void` `
https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags)
`

Flatten this object in to a Parcel.


## Constants

### HEADLESS_DEVICE_OWNER_MODE_AFFILIATED

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int HEADLESS_DEVICE_OWNER_MODE_AFFILIATED
```

Value for `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#getHeadlessDeviceOwnerMode()` which indicates that this DPC should be
provisioned into "affiliated" mode when on a Headless System User Mode device.

This mode adds a Profile Owner to all users other than the user the Device Owner is on.

Starting from Android version `https://developer.android.com/reference/android/os/Build.VERSION_CODES#VANILLA_ICE_CREAM`,
DPCs should set the value of attribute "headless-device-owner-mode" inside the
"headless-system-user" tag as "affiliated".

<br />

Constant Value:

1
(0x00000001)


### HEADLESS_DEVICE_OWNER_MODE_SINGLE_USER

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int HEADLESS_DEVICE_OWNER_MODE_SINGLE_USER
```

Value for `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#getHeadlessDeviceOwnerMode()` which indicates that this DPC should be
provisioned into the first secondary user when on a Headless System User Mode device.

This mode only allows a single secondary user on the device blocking the creation of
additional secondary users.

Starting from Android version `https://developer.android.com/reference/android/os/Build.VERSION_CODES#VANILLA_ICE_CREAM`,
DPCs should set the value of attribute "headless-device-owner-mode" inside the
"headless-system-user" tag as "single_user".

<br />

Constant Value:

2
(0x00000002)


### HEADLESS_DEVICE_OWNER_MODE_UNSUPPORTED

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int HEADLESS_DEVICE_OWNER_MODE_UNSUPPORTED
```

Value for `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#getHeadlessDeviceOwnerMode()` which indicates that this DPC should not be
provisioned into Device Owner mode on a Headless System User Mode device.

<br />

Constant Value:

0
(0x00000000)


### USES_ENCRYPTED_STORAGE

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int USES_ENCRYPTED_STORAGE
```

A type of policy that this device admin can use: require encryption of stored data.

To control this policy, the device admin must have a "encrypted-storage" tag in the
"uses-policies" section of its meta-data.

<br />

Constant Value:

7
(0x00000007)


### USES_POLICY_DISABLE_CAMERA

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int USES_POLICY_DISABLE_CAMERA
```

A type of policy that this device admin can use: disables use of all device cameras.

To control this policy, the device admin must be a device owner or profile owner, and must
have a "disable-camera" tag in the "uses-policies" section of its meta-data. If used by a
device owner, the policy affects all users on the device.

<br />

Constant Value:

8
(0x00000008)


### USES_POLICY_DISABLE_KEYGUARD_FEATURES

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int USES_POLICY_DISABLE_KEYGUARD_FEATURES
```

A type of policy that this device admin can use: disables use of keyguard features.

To control this policy, the device admin must be a device owner or profile owner, and must
have a "disable-keyguard-features" tag in the "uses-policies" section of its meta-data. If
used by a device owner, the policy only affects the primary user and its profiles, but not
any secondary users on the device.

<br />

Constant Value:

9
(0x00000009)


### USES_POLICY_EXPIRE_PASSWORD

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int USES_POLICY_EXPIRE_PASSWORD
```

A type of policy that this device admin can use: force the user to change their password
after an administrator-defined time limit.

To control this policy, the device admin must be a device owner or profile owner, and must
have an "expire-password" tag in the "uses-policies" section of its meta-data. If used by a
device owner, the policy only affects the primary user and its profiles, but not any
secondary users on the device.

<br />

Constant Value:

6
(0x00000006)


### USES_POLICY_FORCE_LOCK

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int USES_POLICY_FORCE_LOCK
```

A type of policy that this device admin can use: able to force the device to lock via`https://developer.android.com/reference/android/app/admin/DevicePolicyManager#lockNow()` or limit the maximum lock timeout for the device via `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setMaximumTimeToLock(android.content.ComponentName,%20long)`.

To control this policy, the device admin must have a "force-lock" tag in the
"uses-policies" section of its meta-data.

<br />

Constant Value:

3
(0x00000003)


### USES_POLICY_LIMIT_PASSWORD

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int USES_POLICY_LIMIT_PASSWORD
```

A type of policy that this device admin can use: limit the passwords that the user can
select, via `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setPasswordQuality(android.content.ComponentName,%20int)` and `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setPasswordMinimumLength(android.content.ComponentName,%20int)`.

To control this policy, the device admin must be a device owner or profile owner, and must
have a "limit-password" tag in the "uses-policies" section of its meta-data. If used by a
device owner, the policy only affects the primary user and its profiles, but not any
secondary users on the device.

<br />

Constant Value:

0
(0x00000000)


### USES_POLICY_RESET_PASSWORD

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int USES_POLICY_RESET_PASSWORD
```

A type of policy that this device admin can use: able to reset the user's password via `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#resetPassword(java.lang.String,%20int)`.

To control this policy, the device admin must have a "reset-password" tag in the
"uses-policies" section of its meta-data.

<br />

Constant Value:

2
(0x00000002)


### USES_POLICY_WATCH_LOGIN

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int USES_POLICY_WATCH_LOGIN
```

A type of policy that this device admin can use: able to watch login attempts from the user,
via `https://developer.android.com/reference/android/app/admin/DeviceAdminReceiver#ACTION_PASSWORD_FAILED`, `https://developer.android.com/reference/android/app/admin/DeviceAdminReceiver#ACTION_PASSWORD_SUCCEEDED`, and `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#getCurrentFailedPasswordAttempts()`.

To control this policy, the device admin must have a "watch-login" tag in the
"uses-policies" section of its meta-data.

<br />

Constant Value:

1
(0x00000001)


### USES_POLICY_WIPE_DATA

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int USES_POLICY_WIPE_DATA
```

A type of policy that this device admin can use: able to factory reset the device, erasing
all of the user's data, via `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#wipeData(int)`.

To control this policy, the device admin must have a "wipe-data" tag in the
"uses-policies" section of its meta-data.

<br />

Constant Value:

4
(0x00000004)


## Fields

### CREATOR

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Creator<DeviceAdminInfo> CREATOR
```

Used to make this class parcelable.

<br />

## Public constructors

### DeviceAdminInfo

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public DeviceAdminInfo (Context context, 
                ResolveInfo resolveInfo)
```

Constructor.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: The Context in which we are parsing the device admin. <br /> |
| `resolveInfo` | `ResolveInfo`: The ResolveInfo returned from the package manager about this device admin's component. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/IOException` |   |
| `https://developer.android.com/reference/org/xmlpull/v1/XmlPullParserException` |   |

## Public methods

### describeContents

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`,
the return value of this method must include the
`https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### dump

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dump (Printer pw, 
                String prefix)
```

<br />

<br />

| Parameters ||
|---|---|
| `pw` | `Printer` <br /> |
| `prefix` | `String` <br /> |

### getActivityInfo

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ActivityInfo getActivityInfo ()
```

Return the raw information about the receiver implementing this device admin. Do not modify
the returned object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/pm/ActivityInfo` | <br /> |

### getComponent

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ComponentName getComponent ()
```

Return the component of the receiver that implements this device admin.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/ComponentName` | This value cannot be `null`. <br /> |

### getHeadlessDeviceOwnerMode

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getHeadlessDeviceOwnerMode ()
```

Returns the mode this DeviceAdmin wishes to use if provisioned as a Device Owner on a
headless system user mode device.

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#HEADLESS_DEVICE_OWNER_MODE_UNSUPPORTED` - `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#HEADLESS_DEVICE_OWNER_MODE_AFFILIATED` - `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#HEADLESS_DEVICE_OWNER_MODE_SINGLE_USER` |

### getPackageName

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getPackageName ()
```

Return the .apk package that implements this device admin.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getReceiverName

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getReceiverName ()
```

Return the class name of the receiver component that implements this device admin.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getTagForPolicy

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getTagForPolicy (int policyIdent)
```

Return the XML tag name for the given policy identifier. Valid identifiers are as per `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#usesPolicy(int)`. If the given identifier is not known, null is returned.

<br />

| Parameters ||
|---|---|
| `policyIdent` | `int` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### isVisible

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isVisible ()
```

Returns whether this device admin would like to be visible to the user, even when it is not
enabled.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### loadDescription

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence loadDescription (PackageManager pm)
```

Load user-visible description associated with this device admin.

<br />

| Parameters ||
|---|---|
| `pm` | `PackageManager`: Supply a PackageManager used to load the device admin's resources. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/android/content/res/Resources.NotFoundException` |   |

### loadIcon

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Drawable loadIcon (PackageManager pm)
```

Load the user-displayed icon for this device admin.

<br />

| Parameters ||
|---|---|
| `pm` | `PackageManager`: Supply a PackageManager used to load the device admin's resources. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | <br /> |

### loadLabel

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence loadLabel (PackageManager pm)
```

Load the user-displayed label for this device admin.

<br />

| Parameters ||
|---|---|
| `pm` | `PackageManager`: Supply a PackageManager used to load the device admin's resources. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | <br /> |

### supportsTransferOwnership

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean supportsTransferOwnership ()
```

Return true if this administrator can be a target in an ownership transfer.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### toString

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### usesPolicy

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean usesPolicy (int policyIdent)
```

Return true if the device admin has requested that it be able to use the given policy
control. The possible policy identifier inputs are: `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#USES_POLICY_LIMIT_PASSWORD`,
`https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#USES_POLICY_WATCH_LOGIN`, `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#USES_POLICY_RESET_PASSWORD`, `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#USES_POLICY_FORCE_LOCK`, `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#USES_POLICY_WIPE_DATA`, `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#USES_POLICY_EXPIRE_PASSWORD`, `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#USES_ENCRYPTED_STORAGE`, `https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#USES_POLICY_DISABLE_CAMERA`.

<br />

| Parameters ||
|---|---|
| `policyIdent` | `int` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### writeToParcel

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void writeToParcel (Parcel dest, 
                int flags)
```

Used to package this object into a `https://developer.android.com/reference/android/os/Parcel`.

<br />

| Parameters ||
|---|---|
| `dest` | `Parcel`: The `https://developer.android.com/reference/android/os/Parcel` to be written. <br /> |
| `flags` | `int`: The flags used for parceling. <br /> |