# NotificationCompat.CarExtender.UnreadConversation.Builder

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/app/NotificationCompat.java+class:androidx.core.app.NotificationCompat.CarExtender.UnreadConversation.Builder) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)

*** ** * ** ***


```
public class NotificationCompat.CarExtender.UnreadConversation.Builder
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> Deprecated in Java

Builder class for `https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation` objects.

## Summary

| ### Public constructors |
|---|
| `[Builder](https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder#Builder(java.lang.String))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html name)` **This method is deprecated.** Deprecated in Java |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder` | `[addMessage](https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder#addMessage(java.lang.String))(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html message)` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation` | `[build](https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder#build())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder` | `[setLatestTimestamp](https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder#setLatestTimestamp(long))(long timestamp)` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder` | `[setReadPendingIntent](https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder#setReadPendingIntent(android.app.PendingIntent))(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/app/PendingIntent.html pendingIntent)` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder` | `[setReplyAction](https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder#setReplyAction(android.app.PendingIntent,androidx.core.app.RemoteInput))( @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/app/PendingIntent.html pendingIntent, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/core/app/RemoteInput remoteInput )` **This method is deprecated.** Deprecated in Java |

## Public constructors

### Builder

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)

```
public [Builder](https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder#Builder(java.lang.String))(@NonNull String name)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Constructs a new builder for `https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html name` | The name of the other participant in the conversation. |

## Public methods

### addMessage

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)

```
public @NonNull NotificationCompat.CarExtender.UnreadConversation.Builder [addMessage](https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder#addMessage(java.lang.String))(@Nullable String message)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Appends a new unread message to the list of messages for this conversation. The messages should be added from oldest to newest.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html message` | The text of the new unread message. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder` | This object for method chaining. |

### build

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)

```
public @NonNull NotificationCompat.CarExtender.UnreadConversation [build](https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder#build())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Builds a new unread conversation object.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation` | The new unread conversation object. |

### setLatestTimestamp

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)

```
public @NonNull NotificationCompat.CarExtender.UnreadConversation.Builder [setLatestTimestamp](https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder#setLatestTimestamp(long))(long timestamp)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Sets the timestamp of the most recent message in an unread conversation. If a messaging notification has been posted by your application and has not yet been cancelled, posting a later notification with the same id and tag but without a newer timestamp may result in Android Auto not displaying a heads up notification for the later notification.

| Parameters |
|---|---|
| `long timestamp` | The timestamp of the most recent message in the conversation. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder` | This object for method chaining. |

### setReadPendingIntent

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)

```
public @NonNull NotificationCompat.CarExtender.UnreadConversation.Builder [setReadPendingIntent](https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder#setReadPendingIntent(android.app.PendingIntent))(@Nullable PendingIntent pendingIntent)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Sets the pending intent that will be sent once the messages in this notification are read.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/app/PendingIntent.html pendingIntent` | The pending intent to use. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder` | This object for method chaining. |

### setReplyAction

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/core#1.3.0)

```
public @NonNull NotificationCompat.CarExtender.UnreadConversation.Builder [setReplyAction](https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder#setReplyAction(android.app.PendingIntent,androidx.core.app.RemoteInput))(
    @Nullable PendingIntent pendingIntent,
    @Nullable RemoteInput remoteInput
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Sets the pending intent and remote input which will convey the reply to this notification.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/app/PendingIntent.html pendingIntent` | The pending intent which will be triggered on a reply. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/core/app/RemoteInput remoteInput` | The remote input parcelable which will carry the reply. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation.Builder` | This object for method chaining. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation#getRemoteInput()` |   |
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.CarExtender.UnreadConversation#getReplyPendingIntent()` |   |