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

# PolicyUpdateReceiver

*** ** * ** ***


`
public


abstract
class
PolicyUpdateReceiver
`


`


`

`

extends https://developer.android.com/reference/android/content/BroadcastReceiver


`

`


`

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

<br />

*** ** * ** ***

Base class for implementing a policy update receiver. This class provides a convenience for
interpreting the raw intent actions (`https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#ACTION_DEVICE_POLICY_SET_RESULT` and `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#ACTION_DEVICE_POLICY_CHANGED`) that are sent by the system.

The callback methods happen on the main thread of the process. Thus, long-running operations
must be done on another thread.

When publishing your `PolicyUpdateReceiver` subclass as a receiver, it must require the
`https://developer.android.com/reference/android/Manifest.permission#BIND_DEVICE_ADMIN` permission.

Admins can implement `https://developer.android.com/reference/android/app/admin/DeviceAdminService` to ensure they receive all policy updates (for
policies they have set) via `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicyChanged(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)` by constantly being bound to by the system.
For more information see `https://developer.android.com/reference/android/app/admin/DeviceAdminService`.

## Summary

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#ACTION_DEVICE_POLICY_CHANGED` Action for a broadcast sent to admins to communicate back a change in a policy they have previously set. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#ACTION_DEVICE_POLICY_SET_RESULT` Action for a broadcast sent to admins to communicate back the result of setting a policy in `https://developer.android.com/reference/android/app/admin/DevicePolicyManager`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#EXTRA_ACCOUNT_TYPE` A string extra holding the account type this policy applies to, (see `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicyChanged(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)` and `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicySetResult(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)`) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#EXTRA_INTENT_FILTER` An `https://developer.android.com/reference/android/content/IntentFilter` extra holding the intent filter the policy relates to, (see `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicyChanged(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)` and `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicySetResult(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)`) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#EXTRA_PACKAGE_NAME` A string extra holding the package name the policy applies to, (see `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicyChanged(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)` and `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicySetResult(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)`) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#EXTRA_PERMISSION_NAME` A string extra holding the permission name the policy applies to, (see `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicyChanged(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)` and `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicySetResult(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)`) |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#PolicyUpdateReceiver()() ` |

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicyChanged(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/java/lang/String policyIdentifier, https://developer.android.com/reference/android/os/Bundle additionalPolicyParams, https://developer.android.com/reference/android/app/admin/TargetUser targetUser, https://developer.android.com/reference/android/app/admin/PolicyUpdateResult policyUpdateResult) ` Callback triggered when a policy previously set by the admin has changed. |
| ` void` | ` https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicySetResult(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/java/lang/String policyIdentifier, https://developer.android.com/reference/android/os/Bundle additionalPolicyParams, https://developer.android.com/reference/android/app/admin/TargetUser targetUser, https://developer.android.com/reference/android/app/admin/PolicyUpdateResult policyUpdateResult) ` Callback triggered after an admin has set a policy using one of the APIs in `https://developer.android.com/reference/android/app/admin/DevicePolicyManager` to notify the admin whether it has been successful or not. |
| ` final void` | ` https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onReceive(android.content.Context,%20android.content.Intent)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/content/Intent intent) ` Intercept standard policy update broadcasts. |

### Inherited methods

From class `

https://developer.android.com/reference/android/content/BroadcastReceiver

` `


final

void` `
https://developer.android.com/reference/android/content/BroadcastReceiver#abortBroadcast()()
`

Sets the flag indicating that this receiver should abort the
current broadcast; only works with broadcasts sent through
`https://developer.android.com/reference/android/content/Context#sendOrderedBroadcast(android.content.Intent,%20java.lang.String)`.


`


final

void` `
https://developer.android.com/reference/android/content/BroadcastReceiver#clearAbortBroadcast()()
`

Clears the flag indicating that this receiver should abort the current
broadcast.


`


final

boolean` `
https://developer.android.com/reference/android/content/BroadcastReceiver#getAbortBroadcast()()
`

Returns the flag indicating whether or not this receiver should
abort the current broadcast.


`


final

boolean` `
https://developer.android.com/reference/android/content/BroadcastReceiver#getDebugUnregister()()
`

Return the last value given to `https://developer.android.com/reference/android/content/BroadcastReceiver#setDebugUnregister(boolean)`.


`


final

int` `
https://developer.android.com/reference/android/content/BroadcastReceiver#getResultCode()()
`

Retrieve the current result code, as set by the previous receiver.


`


final

https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/android/content/BroadcastReceiver#getResultData()()
`

Retrieve the current result data, as set by the previous receiver.


`


final

https://developer.android.com/reference/android/os/Bundle` `
https://developer.android.com/reference/android/content/BroadcastReceiver#getResultExtras(boolean)(boolean makeMap)
`

Retrieve the current result extra data, as set by the previous receiver.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/android/content/BroadcastReceiver#getSentFromPackage()()
`

Returns the package name of the app that initially sent this broadcast.


`


int` `
https://developer.android.com/reference/android/content/BroadcastReceiver#getSentFromUid()()
`

Returns the uid of the app that initially sent this broadcast.


`


final

https://developer.android.com/reference/android/content/BroadcastReceiver.PendingResult` `
https://developer.android.com/reference/android/content/BroadcastReceiver#goAsync()()
`

This can be called by an application in `https://developer.android.com/reference/android/content/BroadcastReceiver#onReceive(android.content.Context,%20android.content.Intent)` to allow
it to keep the broadcast active after returning from that function.


`


final

boolean` `
https://developer.android.com/reference/android/content/BroadcastReceiver#isInitialStickyBroadcast()()
`

Returns true if the receiver is currently processing the initial
value of a sticky broadcast -- that is, the value that was last
broadcast and is currently held in the sticky cache, so this is
not directly the result of a broadcast right now.


`


final

boolean` `
https://developer.android.com/reference/android/content/BroadcastReceiver#isOrderedBroadcast()()
`

Returns true if the receiver is currently processing an ordered
broadcast.


`
abstract


void` `
https://developer.android.com/reference/android/content/BroadcastReceiver#onReceive(android.content.Context,%20android.content.Intent)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/content/Intent intent)
`

This method is called when the BroadcastReceiver is receiving an Intent
broadcast.


`


https://developer.android.com/reference/android/os/IBinder` `
https://developer.android.com/reference/android/content/BroadcastReceiver#peekService(android.content.Context,%20android.content.Intent)(https://developer.android.com/reference/android/content/Context myContext, https://developer.android.com/reference/android/content/Intent service)
`

Provide a binder to an already-bound service.


`


final

void` `
https://developer.android.com/reference/android/content/BroadcastReceiver#setDebugUnregister(boolean)(boolean debug)
`

Control inclusion of debugging help for mismatched
calls to `https://developer.android.com/reference/android/content/Context#registerReceiver(android.content.BroadcastReceiver,%20android.content.IntentFilter)`.


`


final

void` `
https://developer.android.com/reference/android/content/BroadcastReceiver#setOrderedHint(boolean)(boolean isOrdered)
`

For internal use, sets the hint about whether this BroadcastReceiver is
running in ordered mode.


`


final

void` `
https://developer.android.com/reference/android/content/BroadcastReceiver#setResult(int,%20java.lang.String,%20android.os.Bundle)(int code, https://developer.android.com/reference/java/lang/String data, https://developer.android.com/reference/android/os/Bundle extras)
`

Change all of the result data returned from this broadcasts; only works
with broadcasts sent through
`https://developer.android.com/reference/android/content/Context#sendOrderedBroadcast(android.content.Intent,%20java.lang.String)`.


`


final

void` `
https://developer.android.com/reference/android/content/BroadcastReceiver#setResultCode(int)(int code)
`

Change the current result code of this broadcast; only works with
broadcasts sent through
`https://developer.android.com/reference/android/content/Context#sendOrderedBroadcast(android.content.Intent,%20java.lang.String)`.


`


final

void` `
https://developer.android.com/reference/android/content/BroadcastReceiver#setResultData(java.lang.String)(https://developer.android.com/reference/java/lang/String data)
`

Change the current result data of this broadcast; only works with
broadcasts sent through
`https://developer.android.com/reference/android/content/Context#sendOrderedBroadcast(android.content.Intent,%20java.lang.String)`.


`


final

void` `
https://developer.android.com/reference/android/content/BroadcastReceiver#setResultExtras(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle extras)
`

Change the current result extras of this broadcast; only works with
broadcasts sent through
`https://developer.android.com/reference/android/content/Context#sendOrderedBroadcast(android.content.Intent,%20java.lang.String)`.


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*.


## Constants

### ACTION_DEVICE_POLICY_CHANGED

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

```
public static final String ACTION_DEVICE_POLICY_CHANGED
```

Action for a broadcast sent to admins to communicate back a change in a policy they have
previously set.

Admins wishing to receive these updates should include this action in the intent filter
for their receiver in the manifest, the receiver must be protected by `https://developer.android.com/reference/android/Manifest.permission#BIND_DEVICE_ADMIN` to ensure that only the system can send
updates.

Admins shouldn't implement `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onReceive(android.content.Context,%20android.content.Intent)` and should instead implement `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicyChanged(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)`.

<br />

Constant Value:

"android.app.admin.action.DEVICE_POLICY_CHANGED"


### ACTION_DEVICE_POLICY_SET_RESULT

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

```
public static final String ACTION_DEVICE_POLICY_SET_RESULT
```

Action for a broadcast sent to admins to communicate back the result of setting a policy in
`https://developer.android.com/reference/android/app/admin/DevicePolicyManager`.

Admins wishing to receive these updates (via `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicySetResult(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)`) should include
this action in the intent filter for their receiver in the manifest, the receiver must be
protected by `https://developer.android.com/reference/android/Manifest.permission#BIND_DEVICE_ADMIN` to ensure that only the
system can send updates.

Admins shouldn't implement `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onReceive(android.content.Context,%20android.content.Intent)` and should instead implement `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicySetResult(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)`.

<br />

Constant Value:

"android.app.admin.action.DEVICE_POLICY_SET_RESULT"


### EXTRA_ACCOUNT_TYPE

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

```
public static final String EXTRA_ACCOUNT_TYPE
```

A string extra holding the account type this policy applies to, (see `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicyChanged(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)` and `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicySetResult(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)`)

<br />

Constant Value:

"android.app.admin.extra.ACCOUNT_TYPE"


### EXTRA_INTENT_FILTER

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

```
public static final String EXTRA_INTENT_FILTER
```

An `https://developer.android.com/reference/android/content/IntentFilter` extra holding the intent filter the policy relates
to, (see `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicyChanged(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)` and `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicySetResult(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)`)

<br />

Constant Value:

"android.app.admin.extra.INTENT_FILTER"


### EXTRA_PACKAGE_NAME

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

```
public static final String EXTRA_PACKAGE_NAME
```

A string extra holding the package name the policy applies to, (see `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicyChanged(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)` and `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicySetResult(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)`)

<br />

Constant Value:

"android.app.admin.extra.PACKAGE_NAME"


### EXTRA_PERMISSION_NAME

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

```
public static final String EXTRA_PERMISSION_NAME
```

A string extra holding the permission name the policy applies to, (see `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicyChanged(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)` and `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onPolicySetResult(android.content.Context,%20java.lang.String,%20android.os.Bundle,%20android.app.admin.TargetUser,%20android.app.admin.PolicyUpdateResult)`)

<br />

Constant Value:

"android.app.admin.extra.PERMISSION_NAME"


## Public constructors

### PolicyUpdateReceiver

```
public PolicyUpdateReceiver ()
```

<br />

<br />

## Public methods

### onPolicyChanged

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

```
public void onPolicyChanged (Context context, 
                String policyIdentifier, 
                Bundle additionalPolicyParams, 
                TargetUser targetUser, 
                PolicyUpdateResult policyUpdateResult)
```

Callback triggered when a policy previously set by the admin has changed.

Admins wishing to receive this callback should include `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#ACTION_DEVICE_POLICY_CHANGED` in the intent filter for their receiver in
the manifest, the receiver must be protected by `https://developer.android.com/reference/android/Manifest.permission#BIND_DEVICE_ADMIN` to ensure that only the system can send
updates.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: the running context as per `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onReceive(android.content.Context,%20android.content.Intent)` This value cannot be `null`. <br /> |
| `policyIdentifier` | `String`: Key to identify which policy this callback relates to. This value cannot be `null`. <br /> |
| `additionalPolicyParams` | `Bundle`: Bundle containing additional params that may be required to identify some of the policy (e.g. `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#EXTRA_PACKAGE_NAME` and `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#EXTRA_PERMISSION_NAME`). Each policy will document the required additional params if needed. This value cannot be `null`. <br /> |
| `targetUser` | `TargetUser`: The `https://developer.android.com/reference/android/app/admin/TargetUser` which this policy relates to. This value cannot be `null`. <br /> |
| `policyUpdateResult` | `PolicyUpdateResult`: Indicates the reason the policy value has changed (e.g. `https://developer.android.com/reference/android/app/admin/PolicyUpdateResult#RESULT_POLICY_SET` if the policy has changed to the value set by the admin, `https://developer.android.com/reference/android/app/admin/PolicyUpdateResult#RESULT_FAILURE_CONFLICTING_ADMIN_POLICY` if the policy has changed because another admin has set a conflicting policy, etc). This value cannot be `null`. <br /> |

### onPolicySetResult

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

```
public void onPolicySetResult (Context context, 
                String policyIdentifier, 
                Bundle additionalPolicyParams, 
                TargetUser targetUser, 
                PolicyUpdateResult policyUpdateResult)
```

Callback triggered after an admin has set a policy using one of the APIs in `https://developer.android.com/reference/android/app/admin/DevicePolicyManager` to notify the admin whether it has been successful or not.

Admins wishing to receive this callback should include `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#ACTION_DEVICE_POLICY_SET_RESULT` in the intent filter for their receiver
in the manifest, the receiver must be protected by `https://developer.android.com/reference/android/Manifest.permission#BIND_DEVICE_ADMIN` to ensure that only the system can send
updates.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: the running context as per `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#onReceive(android.content.Context,%20android.content.Intent)` This value cannot be `null`. <br /> |
| `policyIdentifier` | `String`: Key to identify which policy this callback relates to. This value cannot be `null`. <br /> |
| `additionalPolicyParams` | `Bundle`: Bundle containing additional params that may be required to identify some of the policy (e.g. `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#EXTRA_PACKAGE_NAME` and `https://developer.android.com/reference/android/app/admin/PolicyUpdateReceiver#EXTRA_PERMISSION_NAME`). Each policy will document the required additional params if needed. This value cannot be `null`. <br /> |
| `targetUser` | `TargetUser`: The `https://developer.android.com/reference/android/app/admin/TargetUser` which this policy relates to. This value cannot be `null`. <br /> |
| `policyUpdateResult` | `PolicyUpdateResult`: Indicates whether the policy has been set successfully (`https://developer.android.com/reference/android/app/admin/PolicyUpdateResult#RESULT_POLICY_SET`) or the reason it failed to apply (e.g. `https://developer.android.com/reference/android/app/admin/PolicyUpdateResult#RESULT_FAILURE_CONFLICTING_ADMIN_POLICY`, etc). This value cannot be `null`. <br /> |

### onReceive

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

```
public final void onReceive (Context context, 
                Intent intent)
```

Intercept standard policy update broadcasts. Implementations should not override this method
and rely on the callbacks instead.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: The Context in which the receiver is running. <br /> |
| `intent` | `Intent`: The Intent being received. <br /> |