# MessageInfo

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/navigation/model/MessageInfo.java+class:androidx.car.app.navigation.model.MessageInfo) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

*** ** * ** ***


```
@CarProtocol
public final class MessageInfo implements NavigationTemplate.NavigationInfo
```

<br />

*** ** * ** ***

Represents a message that can be shown in the `https://developer.android.com/reference/androidx/car/app/navigation/model/NavigationTemplate`.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/car/app/navigation/model/MessageInfo.Builder` A builder of `https://developer.android.com/reference/androidx/car/app/navigation/model/MessageInfo`. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/car/app/navigation/model/MessageInfo#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/CarIcon` | `https://developer.android.com/reference/androidx/car/app/navigation/model/MessageInfo#getImage()()` Returns the image to display along with the message or `null` if not set. |
| `@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/navigation/model/MessageInfo#getText()()` Returns the text to display with the message or `null` if not set. |
| `@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/navigation/model/MessageInfo#getTitle()()` Returns the title of the message or `null` if not set. |
| `int` | `https://developer.android.com/reference/androidx/car/app/navigation/model/MessageInfo#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/navigation/model/MessageInfo#toString()()` |

## Public methods

### equals

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

### getImage

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

```
public @Nullable CarIcon getImage()
```

Returns the image to display along with the message or `null` if not set.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/car/app/navigation/model/MessageInfo.Builder#setImage(androidx.car.app.model.CarIcon)` |   |

### getText

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

```
public @Nullable CarText getText()
```

Returns the text to display with the message or `null` if not set.

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

### getTitle

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

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

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

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

### hashCode

```
public int hashCode()
```

### toString

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