# NotificationManager.Policy

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

# NotificationManager.Policy

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/app/NotificationManager.Policy "View this page in Kotlin")\|Java

`
public
static


class
NotificationManager.Policy
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


implements

`[Parcelable](https://developer.android.com/reference/android/os/Parcelable)`


`

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

<br />

*** ** * ** ***

Notification policy configuration. Represents user-preferences for notification filtering.

## Summary

|                                                                                                                                                                                                                                                                                                                        ### Constants                                                                                                                                                                                                                                                                                                                         ||
|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [CONVERSATION_SENDERS_ANYONE](https://developer.android.com/reference/android/app/NotificationManager.Policy#CONVERSATION_SENDERS_ANYONE) Used to indicate all conversations can bypass dnd.                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `int` | [CONVERSATION_SENDERS_IMPORTANT](https://developer.android.com/reference/android/app/NotificationManager.Policy#CONVERSATION_SENDERS_IMPORTANT) Used to indicate important conversations can bypass dnd.                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `int` | [CONVERSATION_SENDERS_NONE](https://developer.android.com/reference/android/app/NotificationManager.Policy#CONVERSATION_SENDERS_NONE) Used to indicate no conversations can bypass dnd.                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `int` | [PRIORITY_CATEGORY_ALARMS](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_CATEGORY_ALARMS) Alarms are prioritized                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `int` | [PRIORITY_CATEGORY_CALLS](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_CATEGORY_CALLS) Calls are prioritized.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `int` | [PRIORITY_CATEGORY_CONVERSATIONS](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_CATEGORY_CONVERSATIONS) Conversations are allowed through DND.                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `int` | [PRIORITY_CATEGORY_EVENTS](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_CATEGORY_EVENTS) Event notifications are prioritized.                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `int` | [PRIORITY_CATEGORY_MEDIA](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_CATEGORY_MEDIA) Media, game, voice navigation are prioritized                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `int` | [PRIORITY_CATEGORY_MESSAGES](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_CATEGORY_MESSAGES) Message notifications are prioritized.                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `int` | [PRIORITY_CATEGORY_REMINDERS](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_CATEGORY_REMINDERS) Reminder notifications are prioritized.                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `int` | [PRIORITY_CATEGORY_REPEAT_CALLERS](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_CATEGORY_REPEAT_CALLERS) Calls from repeat callers are prioritized.                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `int` | [PRIORITY_CATEGORY_SYSTEM](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_CATEGORY_SYSTEM) System (catch-all for non-never suppressible sounds) are prioritized                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `int` | [PRIORITY_SENDERS_ANY](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_SENDERS_ANY) Any sender is prioritized.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `int` | [PRIORITY_SENDERS_CONTACTS](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_SENDERS_CONTACTS) Saved contacts are prioritized.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `int` | [PRIORITY_SENDERS_STARRED](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_SENDERS_STARRED) Only starred contacts are prioritized.                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `int` | [SUPPRESSED_EFFECT_AMBIENT](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_AMBIENT) Whether notification intercepted by DND are prevented from appearing on ambient displays on devices that support ambient display.                                                                                                                                                                                                                                                                                                                                                                               |
| `int` | [SUPPRESSED_EFFECT_BADGE](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_BADGE) Whether[badges](https://developer.android.com/reference/android/app/NotificationChannel#canShowBadge())from notifications intercepted by DND are blocked on devices that support badging.                                                                                                                                                                                                                                                                                                                           |
| `int` | [SUPPRESSED_EFFECT_FULL_SCREEN_INTENT](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_FULL_SCREEN_INTENT) Whether[full screen intents](https://developer.android.com/reference/android/app/Notification#fullScreenIntent)from notifications intercepted by DND are blocked.                                                                                                                                                                                                                                                                                                                         |
| `int` | [SUPPRESSED_EFFECT_LIGHTS](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_LIGHTS) Whether[notification lights](https://developer.android.com/reference/android/app/NotificationChannel#shouldShowLights())from notifications intercepted by DND are blocked.                                                                                                                                                                                                                                                                                                                                        |
| `int` | [SUPPRESSED_EFFECT_NOTIFICATION_LIST](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_NOTIFICATION_LIST) Whether notification intercepted by DND are prevented from appearing in notification list views like the notification shade or lockscreen on devices that support those views.                                                                                                                                                                                                                                                                                                              |
| `int` | [SUPPRESSED_EFFECT_PEEK](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_PEEK) Whether notifications intercepted by DND are prevented from peeking.                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `int` | [SUPPRESSED_EFFECT_SCREEN_OFF](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_SCREEN_OFF) *This constant was deprecated in API level 28. use[SUPPRESSED_EFFECT_FULL_SCREEN_INTENT](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_FULL_SCREEN_INTENT)and[SUPPRESSED_EFFECT_AMBIENT](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_AMBIENT)and[SUPPRESSED_EFFECT_LIGHTS](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_LIGHTS)individually.* |
| `int` | [SUPPRESSED_EFFECT_SCREEN_ON](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_SCREEN_ON) *This constant was deprecated in API level 28. use[SUPPRESSED_EFFECT_PEEK](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_PEEK).*                                                                                                                                                                                                                                                                                                                         |
| `int` | [SUPPRESSED_EFFECT_STATUS_BAR](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_STATUS_BAR) Whether notifications intercepted by DND are prevented from appearing in the status bar, on devices that support status bars.                                                                                                                                                                                                                                                                                                                                                                             |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ### Inherited constants                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From interface[android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable) |-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `int` | [CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR) Descriptor bit used with[describeContents()](https://developer.android.com/reference/android/os/Parcelable#describeContents()): indicates that the Parcelable object's flattened representation includes a file descriptor.                                                                                                                                            | | `int` | [PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE) Flag for use with[writeToParcel(Parcel, int)](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 `[Creator](https://developer.android.com/reference/android/os/Parcelable.Creator)`<`[NotificationManager.Policy](https://developer.android.com/reference/android/app/NotificationManager.Policy)`>` | [CREATOR](https://developer.android.com/reference/android/app/NotificationManager.Policy#CREATOR) <br />                                                                                                                 |
| ` public final int`                                                                                                                                                                                                       | [priorityCallSenders](https://developer.android.com/reference/android/app/NotificationManager.Policy#priorityCallSenders) Notification senders to prioritize for calls.                                                  |
| ` public final int`                                                                                                                                                                                                       | [priorityCategories](https://developer.android.com/reference/android/app/NotificationManager.Policy#priorityCategories) Notification categories to prioritize.                                                           |
| ` public final int`                                                                                                                                                                                                       | [priorityConversationSenders](https://developer.android.com/reference/android/app/NotificationManager.Policy#priorityConversationSenders) Notification senders to prioritize for conversations.                          |
| ` public final int`                                                                                                                                                                                                       | [priorityMessageSenders](https://developer.android.com/reference/android/app/NotificationManager.Policy#priorityMessageSenders) Notification senders to prioritize for messages.                                         |
| ` public final int`                                                                                                                                                                                                       | [suppressedVisualEffects](https://developer.android.com/reference/android/app/NotificationManager.Policy#suppressedVisualEffects) Visual effects to suppress for a notification that is filtered by Do Not Disturb mode. |

|                                                                                                                                                               ### Public constructors                                                                                                                                                               ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[Policy](https://developer.android.com/reference/android/app/NotificationManager.Policy#Policy(int,%20int,%20int))`(int priorityCategories, int priorityCallSenders, int priorityMessageSenders) ` Constructs a policy for Do Not Disturb priority mode behavior.                                                                             |
| ` `[Policy](https://developer.android.com/reference/android/app/NotificationManager.Policy#Policy(int,%20int,%20int,%20int))`(int priorityCategories, int priorityCallSenders, int priorityMessageSenders, int suppressedVisualEffects) ` Constructs a policy for Do Not Disturb priority mode behavior.                                         |
| ` `[Policy](https://developer.android.com/reference/android/app/NotificationManager.Policy#Policy(int,%20int,%20int,%20int,%20int))`(int priorityCategories, int priorityCallSenders, int priorityMessageSenders, int suppressedVisualEffects, int priorityConversationSenders) ` Constructs a policy for Do Not Disturb priority mode behavior. |

|                                                                                                                                                                   ### Public methods                                                                                                                                                                   ||
|------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` int`                                                                       | ` `[describeContents](https://developer.android.com/reference/android/app/NotificationManager.Policy#describeContents())`() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.                                    |
| ` boolean`                                                                   | ` `[equals](https://developer.android.com/reference/android/app/NotificationManager.Policy#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` o) ` Indicates whether some other object is "equal to" this one.              |
| ` int`                                                                       | ` `[hashCode](https://developer.android.com/reference/android/app/NotificationManager.Policy#hashCode())`() ` Returns a hash code value for the object.                                                                                                                  |
| ` static `[String](https://developer.android.com/reference/java/lang/String) | ` `[priorityCategoriesToString](https://developer.android.com/reference/android/app/NotificationManager.Policy#priorityCategoriesToString(int))`(int priorityCategories) `                                                                                               |
| ` static `[String](https://developer.android.com/reference/java/lang/String) | ` `[prioritySendersToString](https://developer.android.com/reference/android/app/NotificationManager.Policy#prioritySendersToString(int))`(int prioritySenders) `                                                                                                        |
| ` static `[String](https://developer.android.com/reference/java/lang/String) | ` `[suppressedEffectsToString](https://developer.android.com/reference/android/app/NotificationManager.Policy#suppressedEffectsToString(int))`(int effects) `                                                                                                            |
| ` `[String](https://developer.android.com/reference/java/lang/String)        | ` `[toString](https://developer.android.com/reference/android/app/NotificationManager.Policy#toString())`() ` Returns a string representation of the object.                                                                                                             |
| ` void`                                                                      | ` `[writeToParcel](https://developer.android.com/reference/android/app/NotificationManager.Policy#writeToParcel(android.os.Parcel,%20int))`(`[Parcel](https://developer.android.com/reference/android/os/Parcel)` dest, int flags) ` Flatten this object in to a Parcel. |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](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 `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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` `[android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable)` ` |------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract int`  | ` `[describeContents](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` | ` `[writeToParcel](https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int))`(`[Parcel](https://developer.android.com/reference/android/os/Parcel)` dest, int flags) ` Flatten this object in to a Parcel. | ||

## Constants

### CONVERSATION_SENDERS_ANYONE

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

```
public static final int CONVERSATION_SENDERS_ANYONE
```

Used to indicate all conversations can bypass dnd.

<br />

Constant Value: 1 (0x00000001)  

### CONVERSATION_SENDERS_IMPORTANT

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

```
public static final int CONVERSATION_SENDERS_IMPORTANT
```

Used to indicate important conversations can bypass dnd.

<br />

Constant Value: 2 (0x00000002)  

### CONVERSATION_SENDERS_NONE

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

```
public static final int CONVERSATION_SENDERS_NONE
```

Used to indicate no conversations can bypass dnd.

<br />

Constant Value: 3 (0x00000003)  

### PRIORITY_CATEGORY_ALARMS

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

```
public static final int PRIORITY_CATEGORY_ALARMS
```

Alarms are prioritized

<br />

Constant Value: 32 (0x00000020)  

### PRIORITY_CATEGORY_CALLS

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

```
public static final int PRIORITY_CATEGORY_CALLS
```

Calls are prioritized.

<br />

Constant Value: 8 (0x00000008)  

### PRIORITY_CATEGORY_CONVERSATIONS

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

```
public static final int PRIORITY_CATEGORY_CONVERSATIONS
```

Conversations are allowed through DND.

<br />

Constant Value: 256 (0x00000100)  

### PRIORITY_CATEGORY_EVENTS

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

```
public static final int PRIORITY_CATEGORY_EVENTS
```

Event notifications are prioritized.

<br />

Constant Value: 2 (0x00000002)  

### PRIORITY_CATEGORY_MEDIA

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

```
public static final int PRIORITY_CATEGORY_MEDIA
```

Media, game, voice navigation are prioritized

<br />

Constant Value: 64 (0x00000040)  

### PRIORITY_CATEGORY_MESSAGES

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

```
public static final int PRIORITY_CATEGORY_MESSAGES
```

Message notifications are prioritized.

<br />

Constant Value: 4 (0x00000004)  

### PRIORITY_CATEGORY_REMINDERS

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

```
public static final int PRIORITY_CATEGORY_REMINDERS
```

Reminder notifications are prioritized.

<br />

Constant Value: 1 (0x00000001)  

### PRIORITY_CATEGORY_REPEAT_CALLERS

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

```
public static final int PRIORITY_CATEGORY_REPEAT_CALLERS
```

Calls from repeat callers are prioritized.

<br />

Constant Value: 16 (0x00000010)  

### PRIORITY_CATEGORY_SYSTEM

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

```
public static final int PRIORITY_CATEGORY_SYSTEM
```

System (catch-all for non-never suppressible sounds) are prioritized

<br />

Constant Value: 128 (0x00000080)  

### PRIORITY_SENDERS_ANY

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

```
public static final int PRIORITY_SENDERS_ANY
```

Any sender is prioritized.

<br />

Constant Value: 0 (0x00000000)  

### PRIORITY_SENDERS_CONTACTS

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

```
public static final int PRIORITY_SENDERS_CONTACTS
```

Saved contacts are prioritized.

<br />

Constant Value: 1 (0x00000001)  

### PRIORITY_SENDERS_STARRED

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

```
public static final int PRIORITY_SENDERS_STARRED
```

Only starred contacts are prioritized.

<br />

Constant Value: 2 (0x00000002)  

### SUPPRESSED_EFFECT_AMBIENT

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

```
public static final int SUPPRESSED_EFFECT_AMBIENT
```

Whether notification intercepted by DND are prevented from appearing on ambient displays on devices that support ambient display.

<br />

Constant Value: 128 (0x00000080)  

### SUPPRESSED_EFFECT_BADGE

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

```
public static final int SUPPRESSED_EFFECT_BADGE
```

Whether[badges](https://developer.android.com/reference/android/app/NotificationChannel#canShowBadge())from notifications intercepted by DND are blocked on devices that support badging.

<br />

Constant Value: 64 (0x00000040)  

### SUPPRESSED_EFFECT_FULL_SCREEN_INTENT

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

```
public static final int SUPPRESSED_EFFECT_FULL_SCREEN_INTENT
```

Whether[full screen intents](https://developer.android.com/reference/android/app/Notification#fullScreenIntent)from notifications intercepted by DND are blocked.

<br />

Constant Value: 4 (0x00000004)  

### SUPPRESSED_EFFECT_LIGHTS

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

```
public static final int SUPPRESSED_EFFECT_LIGHTS
```

Whether[notification lights](https://developer.android.com/reference/android/app/NotificationChannel#shouldShowLights())from notifications intercepted by DND are blocked.

<br />

Constant Value: 8 (0x00000008)  

### SUPPRESSED_EFFECT_NOTIFICATION_LIST

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

```
public static final int SUPPRESSED_EFFECT_NOTIFICATION_LIST
```

Whether notification intercepted by DND are prevented from appearing in notification list views like the notification shade or lockscreen on devices that support those views.

<br />

Constant Value: 256 (0x00000100)  

### SUPPRESSED_EFFECT_PEEK

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

```
public static final int SUPPRESSED_EFFECT_PEEK
```

Whether notifications intercepted by DND are prevented from peeking.

<br />

Constant Value: 16 (0x00000010)  

### SUPPRESSED_EFFECT_SCREEN_OFF

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

```
public static final int SUPPRESSED_EFFECT_SCREEN_OFF
```

<br />

**This constant was deprecated in API level 28.**   
use[SUPPRESSED_EFFECT_FULL_SCREEN_INTENT](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_FULL_SCREEN_INTENT)and[SUPPRESSED_EFFECT_AMBIENT](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_AMBIENT)and[SUPPRESSED_EFFECT_LIGHTS](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_LIGHTS)individually.

Whether notifications suppressed by DND should not interrupt visually (e.g. with notification lights or by turning the screen on) when the screen is off.

<br />

Constant Value: 1 (0x00000001)  

### SUPPRESSED_EFFECT_SCREEN_ON

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

```
public static final int SUPPRESSED_EFFECT_SCREEN_ON
```

<br />

**This constant was deprecated in API level 28.**   
use[SUPPRESSED_EFFECT_PEEK](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_PEEK).

Whether notifications suppressed by DND should not interrupt visually when the screen is on (e.g. by peeking onto the screen).

<br />

Constant Value: 2 (0x00000002)  

### SUPPRESSED_EFFECT_STATUS_BAR

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

```
public static final int SUPPRESSED_EFFECT_STATUS_BAR
```

Whether notifications intercepted by DND are prevented from appearing in the status bar, on devices that support status bars.

<br />

Constant Value: 32 (0x00000020)

## Fields

### CREATOR

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

```
public static final Creator<NotificationManager.Policy> CREATOR
```

<br />

<br />

### priorityCallSenders

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

```
public final int priorityCallSenders
```

Notification senders to prioritize for calls. One of: PRIORITY_SENDERS_ANY, PRIORITY_SENDERS_CONTACTS, PRIORITY_SENDERS_STARRED  
Value is[PRIORITY_SENDERS_ANY](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_SENDERS_ANY),[PRIORITY_SENDERS_CONTACTS](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_SENDERS_CONTACTS), or[PRIORITY_SENDERS_STARRED](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_SENDERS_STARRED)

<br />

### priorityCategories

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

```
public final int priorityCategories
```

Notification categories to prioritize. Bitmask of PRIORITY_CATEGORY_\* constants.

<br />

### priorityConversationSenders

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

```
public final int priorityConversationSenders
```

Notification senders to prioritize for conversations. One of:[CONVERSATION_SENDERS_NONE](https://developer.android.com/reference/android/app/NotificationManager.Policy#CONVERSATION_SENDERS_NONE),[CONVERSATION_SENDERS_IMPORTANT](https://developer.android.com/reference/android/app/NotificationManager.Policy#CONVERSATION_SENDERS_IMPORTANT),[CONVERSATION_SENDERS_ANYONE](https://developer.android.com/reference/android/app/NotificationManager.Policy#CONVERSATION_SENDERS_ANYONE).  
Value is[CONVERSATION_SENDERS_ANYONE](https://developer.android.com/reference/android/app/NotificationManager.Policy#CONVERSATION_SENDERS_ANYONE),[CONVERSATION_SENDERS_IMPORTANT](https://developer.android.com/reference/android/app/NotificationManager.Policy#CONVERSATION_SENDERS_IMPORTANT), or[CONVERSATION_SENDERS_NONE](https://developer.android.com/reference/android/app/NotificationManager.Policy#CONVERSATION_SENDERS_NONE)

<br />

### priorityMessageSenders

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

```
public final int priorityMessageSenders
```

Notification senders to prioritize for messages. One of: PRIORITY_SENDERS_ANY, PRIORITY_SENDERS_CONTACTS, PRIORITY_SENDERS_STARRED  
Value is[PRIORITY_SENDERS_ANY](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_SENDERS_ANY),[PRIORITY_SENDERS_CONTACTS](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_SENDERS_CONTACTS), or[PRIORITY_SENDERS_STARRED](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_SENDERS_STARRED)

<br />

### suppressedVisualEffects

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

```
public final int suppressedVisualEffects
```

Visual effects to suppress for a notification that is filtered by Do Not Disturb mode. Bitmask of SUPPRESSED_EFFECT_\* constants.

<br />

## Public constructors

### Policy

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

```
public Policy (int priorityCategories, 
                int priorityCallSenders, 
                int priorityMessageSenders)
```

Constructs a policy for Do Not Disturb priority mode behavior.

Apps that target API levels below[Build.VERSION_CODES.P](https://developer.android.com/reference/android/os/Build.VERSION_CODES#P)cannot change user-designated values to allow or disallow[Policy.PRIORITY_CATEGORY_ALARMS](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_CATEGORY_ALARMS),[Policy.PRIORITY_CATEGORY_SYSTEM](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_CATEGORY_SYSTEM), and[Policy.PRIORITY_CATEGORY_MEDIA](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_CATEGORY_MEDIA)from bypassing dnd.

<br />

|                                             Parameters                                              ||
|--------------------------|---------------------------------------------------------------------------|
| `priorityCategories`     | `int`: bitmask of categories of notifications that can bypass DND. <br /> |
| `priorityCallSenders`    | `int`: which callers can bypass DND. <br />                               |
| `priorityMessageSenders` | `int`: which message senders can bypass DND. <br />                       |

### Policy

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

```
public Policy (int priorityCategories, 
                int priorityCallSenders, 
                int priorityMessageSenders, 
                int suppressedVisualEffects)
```

Constructs a policy for Do Not Disturb priority mode behavior.

Apps that target API levels below[Build.VERSION_CODES.R](https://developer.android.com/reference/android/os/Build.VERSION_CODES#R)cannot change user-designated values to allow or disallow[Policy.PRIORITY_CATEGORY_CONVERSATIONS](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_CATEGORY_CONVERSATIONS), from bypassing dnd.

Additionally, apps that target API levels below[Build.VERSION_CODES.P](https://developer.android.com/reference/android/os/Build.VERSION_CODES#P)can only modify the[SUPPRESSED_EFFECT_SCREEN_ON](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_SCREEN_ON)and[SUPPRESSED_EFFECT_SCREEN_OFF](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_SCREEN_OFF)bits of the suppressed visual effects field. All other suppressed effects will be ignored and reconstituted from the screen on and screen off values.

Apps that target[Build.VERSION_CODES.P](https://developer.android.com/reference/android/os/Build.VERSION_CODES#P)or above can set any suppressed visual effects. However, if any suppressed effects \>[SUPPRESSED_EFFECT_SCREEN_ON](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_SCREEN_ON)are set,[SUPPRESSED_EFFECT_SCREEN_ON](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_SCREEN_ON)and[SUPPRESSED_EFFECT_SCREEN_OFF](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_SCREEN_OFF)will be ignored and reconstituted from the more specific suppressed visual effect bits. Apps should migrate to targeting specific effects instead of the deprecated[SUPPRESSED_EFFECT_SCREEN_ON](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_SCREEN_ON)and[SUPPRESSED_EFFECT_SCREEN_OFF](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_SCREEN_OFF)effects.

<br />

|                                                              Parameters                                                               ||
|---------------------------|------------------------------------------------------------------------------------------------------------|
| `priorityCategories`      | `int`: bitmask of categories of notifications that can bypass DND. <br />                                  |
| `priorityCallSenders`     | `int`: which callers can bypass DND. <br />                                                                |
| `priorityMessageSenders`  | `int`: which message senders can bypass DND. <br />                                                        |
| `suppressedVisualEffects` | `int`: which visual interruptions should be suppressed from notifications that are filtered by DND. <br /> |

### Policy

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

```
public Policy (int priorityCategories, 
                int priorityCallSenders, 
                int priorityMessageSenders, 
                int suppressedVisualEffects, 
                int priorityConversationSenders)
```

Constructs a policy for Do Not Disturb priority mode behavior.

Apps that target API levels below[Build.VERSION_CODES.P](https://developer.android.com/reference/android/os/Build.VERSION_CODES#P)cannot change user-designated values to allow or disallow[Policy.PRIORITY_CATEGORY_CONVERSATIONS](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_CATEGORY_CONVERSATIONS)from bypassing dnd. If you do need to change them, use a[ZenPolicy](https://developer.android.com/reference/android/service/notification/ZenPolicy)associated with an[AutomaticZenRule](https://developer.android.com/reference/android/app/AutomaticZenRule)instead of changing the global setting.

Apps that target API levels below[Build.VERSION_CODES.P](https://developer.android.com/reference/android/os/Build.VERSION_CODES#P)cannot change user-designated values to allow or disallow[Policy.PRIORITY_CATEGORY_ALARMS](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_CATEGORY_ALARMS),[Policy.PRIORITY_CATEGORY_SYSTEM](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_CATEGORY_SYSTEM), and[Policy.PRIORITY_CATEGORY_MEDIA](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_CATEGORY_MEDIA)from bypassing dnd.

Additionally, apps that target API levels below[Build.VERSION_CODES.P](https://developer.android.com/reference/android/os/Build.VERSION_CODES#P)can only modify the[SUPPRESSED_EFFECT_SCREEN_ON](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_SCREEN_ON)and[SUPPRESSED_EFFECT_SCREEN_OFF](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_SCREEN_OFF)bits of the suppressed visual effects field. All other suppressed effects will be ignored and reconstituted from the screen on and screen off values.

Apps that target[Build.VERSION_CODES.P](https://developer.android.com/reference/android/os/Build.VERSION_CODES#P)or above can set any suppressed visual effects. However, if any suppressed effects \>[SUPPRESSED_EFFECT_SCREEN_ON](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_SCREEN_ON)are set,[SUPPRESSED_EFFECT_SCREEN_ON](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_SCREEN_ON)and[SUPPRESSED_EFFECT_SCREEN_OFF](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_SCREEN_OFF)will be ignored and reconstituted from the more specific suppressed visual effect bits. Apps should migrate to targeting specific effects instead of the deprecated[SUPPRESSED_EFFECT_SCREEN_ON](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_SCREEN_ON)and[SUPPRESSED_EFFECT_SCREEN_OFF](https://developer.android.com/reference/android/app/NotificationManager.Policy#SUPPRESSED_EFFECT_SCREEN_OFF)effects.

<br />

|                                                                                                                                                                                                                                             Parameters                                                                                                                                                                                                                                              ||
|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `priorityCategories`          | `int`: bitmask of categories of notifications that can bypass DND. <br />                                                                                                                                                                                                                                                                                                                                                                                            |
| `priorityCallSenders`         | `int`: which callers can bypass DND. Value is[PRIORITY_SENDERS_ANY](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_SENDERS_ANY),[PRIORITY_SENDERS_CONTACTS](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_SENDERS_CONTACTS), or[PRIORITY_SENDERS_STARRED](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_SENDERS_STARRED) <br />         |
| `priorityMessageSenders`      | `int`: which message senders can bypass DND. Value is[PRIORITY_SENDERS_ANY](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_SENDERS_ANY),[PRIORITY_SENDERS_CONTACTS](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_SENDERS_CONTACTS), or[PRIORITY_SENDERS_STARRED](https://developer.android.com/reference/android/app/NotificationManager.Policy#PRIORITY_SENDERS_STARRED) <br /> |
| `suppressedVisualEffects`     | `int`: which visual interruptions should be suppressed from notifications that are filtered by DND. <br />                                                                                                                                                                                                                                                                                                                                                           |
| `priorityConversationSenders` | `int`: Value is[CONVERSATION_SENDERS_ANYONE](https://developer.android.com/reference/android/app/NotificationManager.Policy#CONVERSATION_SENDERS_ANYONE),[CONVERSATION_SENDERS_IMPORTANT](https://developer.android.com/reference/android/app/NotificationManager.Policy#CONVERSATION_SENDERS_IMPORTANT), or[CONVERSATION_SENDERS_NONE](https://developer.android.com/reference/android/app/NotificationManager.Policy#CONVERSATION_SENDERS_NONE) <br />             |

## Public methods

### describeContents

Added in[API level 23](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[writeToParcel(android.os.Parcel, int)](https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)), the return value of this method must include the[CONTENTS_FILE_DESCRIPTOR](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[CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR) <br /> |

### equals

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

```
public boolean equals (Object o)
```

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

The`equals`method implements an equivalence relation on non-null object references:

- It is*reflexive* : for any non-null reference value`x`,`x.equals(x)`should return`true`.
- It is*symmetric* : for any non-null reference values`x`and`y`,`x.equals(y)`should return`true`if and only if`y.equals(x)`returns`true`.
- It is*transitive* : for any non-null reference values`x`,`y`, and`z`, if`x.equals(y)`returns`true`and`y.equals(z)`returns`true`, then`x.equals(z)`should return`true`.
- It is*consistent* : for any non-null reference values`x`and`y`, multiple invocations of`x.equals(y)`consistently return`true`or consistently return`false`, provided no information used in`equals`comparisons on the objects is modified.
- For any non-null reference value`x`,`x.equals(null)`should return`false`.

An equivalence relation partitions the elements it operates on into*equivalence classes*; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

<br />

|                   Parameters                   ||
|-----|-------------------------------------------|
| `o` | `Object`: This value may be`null`. <br /> |

|                                         Returns                                          ||
|-----------|-------------------------------------------------------------------------------|
| `boolean` | `true`if this object is the same as the obj argument;`false`otherwise. <br /> |

### hashCode

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

```
public int hashCode ()
```

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by[HashMap](https://developer.android.com/reference/java/util/HashMap).

The general contract of`hashCode`is:

- Whenever it is invoked on the same object more than once during an execution of a Java application, the`hashCode`method must consistently return the same integer, provided no information used in`equals`comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
- If two objects are equal according to the[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))method, then calling the`hashCode`method on each of the two objects must produce the same integer result.
- It is*not* required that if two objects are unequal according to the[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))method, then calling the`hashCode`method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

<br />

<br />

|                     Returns                      ||
|-------|-------------------------------------------|
| `int` | a hash code value for this object. <br /> |

### priorityCategoriesToString

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

```
public static String priorityCategoriesToString (int priorityCategories)
```

<br />

<br />

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

|                                  Returns                                   ||
|--------------------------------------------------------------------|--------|
| [String](https://developer.android.com/reference/java/lang/String) | <br /> |

### prioritySendersToString

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

```
public static String prioritySendersToString (int prioritySenders)
```

<br />

<br />

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

|                                  Returns                                   ||
|--------------------------------------------------------------------|--------|
| [String](https://developer.android.com/reference/java/lang/String) | <br /> |

### suppressedEffectsToString

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

```
public static String suppressedEffectsToString (int effects)
```

<br />

<br />

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

|                                  Returns                                   ||
|--------------------------------------------------------------------|--------|
| [String](https://developer.android.com/reference/java/lang/String) | <br /> |

### toString

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

```
public String toString ()
```

Returns a string representation of the object.

<br />

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

### writeToParcel

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

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

Flatten this object in to a Parcel.

<br />

|                                                                                                                                                                                                                               Parameters                                                                                                                                                                                                                                ||
|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `dest`  | `Parcel`: The Parcel in which the object should be written. This value cannot be`null`. <br />                                                                                                                                                                                                                                                                                                                                                                 |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or[Parcelable.PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE). Value is either`0`or a combination of[Parcelable.PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE), and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES <br /> |