# LongMessageTemplate

Artifact: [androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app) [View Source](https://cs.android.com/search?q=file:androidx/car/app/model/LongMessageTemplate.java+class:androidx.car.app.model.LongMessageTemplate) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

*** ** * ** ***


```
@RequiresCarApi(value = 2)
@CarProtocol
public final class LongMessageTemplate implements Template
```

<br />

*** ** * ** ***

A template for displaying a long text, which could be several paragraphs long, with associated actions.

#### Template Restrictions

This template's body is only available to the user while the car is parked and does not count against the template quota.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/car/app/Screen#onGetTemplate()` |   |

## Summary

| ### Nested types |
|---|
| `@https://developer.android.com/reference/androidx/car/app/annotations/RequiresCarApi(value = 2) public final class https://developer.android.com/reference/androidx/car/app/model/LongMessageTemplate.Builder` A builder of `https://developer.android.com/reference/androidx/car/app/model/LongMessageTemplate`. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/car/app/model/LongMessageTemplate#equals(java.lang.Object)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html other)` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/ActionStrip` | `https://developer.android.com/reference/androidx/car/app/model/LongMessageTemplate#getActionStrip()()` Returns the `https://developer.android.com/reference/androidx/car/app/model/ActionStrip` for this template or `null` if not set. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/car/app/model/Action>` | `https://developer.android.com/reference/androidx/car/app/model/LongMessageTemplate#getActions()()` Returns the list of actions to display in the template. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/Action` | `https://developer.android.com/reference/androidx/car/app/model/LongMessageTemplate#getHeaderAction()()` Returns the `https://developer.android.com/reference/androidx/car/app/model/Action` that is set to be displayed in the header of the template, or `null` if not set. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/CarText` | `https://developer.android.com/reference/androidx/car/app/model/LongMessageTemplate#getMessage()()` Returns the message to display in the template, which could be several paragraphs long. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/CarText` | `https://developer.android.com/reference/androidx/car/app/model/LongMessageTemplate#getTitle()()` Returns the title of the template or `null` if not set. |
| `int` | `https://developer.android.com/reference/androidx/car/app/model/LongMessageTemplate#hashCode()()` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/car/app/model/LongMessageTemplate#toString()()` |

## Public methods

### equals

```
public boolean equals(@Nullable Object other)
```

### getActionStrip

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

```
public @Nullable ActionStrip getActionStrip()
```

Returns the `https://developer.android.com/reference/androidx/car/app/model/ActionStrip` for this template or `null` if not set.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/car/app/model/LongMessageTemplate.Builder#setActionStrip(androidx.car.app.model.ActionStrip)` |   |

### getActions

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

```
public @NonNull List<Action> getActions()
```

Returns the list of actions to display in the template.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/car/app/model/LongMessageTemplate.Builder#addAction(androidx.car.app.model.Action)` |   |

### getHeaderAction

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

```
public @Nullable Action getHeaderAction()
```

Returns the `https://developer.android.com/reference/androidx/car/app/model/Action` that is set to be displayed in the header of the template, or `null` if not set.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/car/app/model/LongMessageTemplate.Builder#setHeaderAction(androidx.car.app.model.Action)` |   |

### getMessage

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

```
public @NonNull CarText getMessage()
```

Returns the message to display in the template, which could be several paragraphs long.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/car/app/model/LongMessageTemplate.Builder#Builder(java.lang.CharSequence)` |   |

### getTitle

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

```
public @Nullable CarText getTitle()
```

Returns the title of the template or `null` if not set.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/car/app/model/LongMessageTemplate.Builder#setTitle(java.lang.CharSequence)` |   |

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```