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

# Notification.ProjectedExtender

*** ** * ** ***


`
public
static
final

class
Notification.ProjectedExtender
`


`

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


`

`


implements

https://developer.android.com/reference/android/app/Notification.Extender


`

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

<br />

*** ** * ** ***

Helper class to add projection-specific extensions to a notification.
This class is used to specify metadata that is specific to notifications
that may be displayed on a Projected device.

To create a notification with Projected extensions:

1. Create a `https://developer.android.com/reference/android/app/Notification.Builder` for the notification.
2. Create an `ProjectedExtender`.
3. Set projection-specific properties using the `set` methods on the `ProjectedExtender`.
4. Call `https://developer.android.com/reference/android/app/Notification.Builder#extend(android.app.Notification.Extender)` to apply the extensions to the notification.

```
Notification.Builder builder = new Notification.Builder(context, CHANNEL_ID)
    .setContentTitle("Example Title")
    .setContentText("Example Text")
    .setSmallIcon(R.drawable.ic_notification);

ProjectedExtender projectedExtender = new ProjectedExtender()
    .setContentIntent(projectedTapIntent);

builder.extend(projectedExtender);
notificationManager.notify(NOTIFICATION_ID, builder.build());
```

<br />

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/app/Notification.ProjectedExtender#ProjectedExtender()() ` Create a `https://developer.android.com/reference/android/app/Notification.ProjectedExtender` with default options. |
| ` https://developer.android.com/reference/android/app/Notification.ProjectedExtender#ProjectedExtender(android.app.Notification)(https://developer.android.com/reference/android/app/Notification notification) ` Creates an `https://developer.android.com/reference/android/app/Notification.ProjectedExtender` from the extensions in a `https://developer.android.com/reference/android/app/Notification`. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/app/Notification.Builder` | ` https://developer.android.com/reference/android/app/Notification.ProjectedExtender#extend(android.app.Notification.Builder)(https://developer.android.com/reference/android/app/Notification.Builder builder) ` Applies the Projected extensions to the notification builder. |
| ` https://developer.android.com/reference/android/app/PendingIntent` | ` https://developer.android.com/reference/android/app/Notification.ProjectedExtender#getContentIntent()() ` Returns the `https://developer.android.com/reference/android/app/PendingIntent` to be fired when the notification is tapped on the Projected device. |
| ` https://developer.android.com/reference/android/app/Notification.ProjectedExtender` | ` https://developer.android.com/reference/android/app/Notification.ProjectedExtender#setContentIntent(android.app.PendingIntent)(https://developer.android.com/reference/android/app/PendingIntent intent) ` Sets the `https://developer.android.com/reference/android/app/PendingIntent` to be opened on the Projected device when the notification is tapped on the that device. |

### Inherited methods

From class `

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

` `


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

Creates and returns a copy of this object.


`


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

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


`


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

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


`


final

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

Returns the runtime class of this `Object`.


`


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

Returns a hash code value for the object.


`


final

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

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


`


final

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

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


`


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

Returns a string representation of the object.


`


final

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

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


`


final

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

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


`


final

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

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


From interface `

https://developer.android.com/reference/android/app/Notification.Extender

` `
abstract


https://developer.android.com/reference/android/app/Notification.Builder` `
https://developer.android.com/reference/android/app/Notification.Extender#extend(android.app.Notification.Builder)(https://developer.android.com/reference/android/app/Notification.Builder builder)
`

Apply this extender to a notification builder.


## Public constructors

### ProjectedExtender

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

```
public ProjectedExtender ()
```

Create a `https://developer.android.com/reference/android/app/Notification.ProjectedExtender` with default options.

<br />

### ProjectedExtender

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

```
public ProjectedExtender (Notification notification)
```

Creates an `https://developer.android.com/reference/android/app/Notification.ProjectedExtender` from the extensions in a
`https://developer.android.com/reference/android/app/Notification`.

<br />

| Parameters ||
|---|---|
| `notification` | `Notification`: The notification to extract extensions from. This value cannot be `null`. <br /> |

## Public methods

### extend

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

```
public Notification.Builder extend (Notification.Builder builder)
```

Applies the Projected extensions to the notification builder. This method is
called by the `https://developer.android.com/reference/android/app/Notification.Builder#extend(android.app.Notification.Extender)` method and should not
be called directly.

<br />

| Parameters ||
|---|---|
| `builder` | `Notification.Builder`: the notification builder to extend. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/Notification.Builder` | the modified notification builder. This value cannot be `null`. <br /> |

### getContentIntent

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

```
public PendingIntent getContentIntent ()
```

Returns the `https://developer.android.com/reference/android/app/PendingIntent` to be fired when the notification is
tapped on the Projected device.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/PendingIntent` | the `https://developer.android.com/reference/android/app/PendingIntent` to fire on tap, or null if not set <br /> |

### setContentIntent

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

```
public Notification.ProjectedExtender setContentIntent (PendingIntent intent)
```

Sets the `https://developer.android.com/reference/android/app/PendingIntent` to be opened on the Projected device when the notification
is tapped on the that device. This is distinct from the notification's main
`https://developer.android.com/reference/android/app/Notification#contentIntent`, which is typically fired when the
notification is tapped on the host device (e.g., the phone).

<br />

| Parameters ||
|---|---|
| `intent` | `PendingIntent`: the `https://developer.android.com/reference/android/app/PendingIntent` to fire on tap. This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/Notification.ProjectedExtender` | this `ProjectedExtender` object for chaining. This value cannot be `null`. <br /> |