# MessageInfo

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/car/app/navigation/model/MessageInfo "View this page in Java")

<br />

```
@CarProtocol
class MessageInfo : NavigationTemplate.NavigationInfo
```

<br />

*** ** * ** ***

Represents a message that can be shown in the[NavigationTemplate](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/NavigationTemplate).

## Summary

|                                                                                                                       ### Nested types                                                                                                                       |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[MessageInfo.Builder](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MessageInfo.Builder) A builder of[MessageInfo](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MessageInfo). |

|                                    ### Public functions                                     |
|---------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)         | [equals](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MessageInfo#equals(java.lang.Object))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` |
| [CarIcon](https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon)`?` | [getImage](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MessageInfo#getImage())`()` Returns the image to display along with the message or`null`if not set.                          |
| [CarText](https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText)`?` | [getText](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MessageInfo#getText())`()` Returns the text to display with the message or`null`if not set.                                   |
| [CarText](https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText)`?` | [getTitle](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MessageInfo#getTitle())`()` Returns the title of the message or`null`if not set.                                             |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                 | [hashCode](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MessageInfo#hashCode())`()`                                                                                                  |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)           | [toString](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MessageInfo#toString())`()`                                                                                                  |

## Public functions

### equals

```
fun equals(other: Any?): Boolean
```  

### getImage

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

```
fun getImage(): CarIcon?
```

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

|                                                                         See also                                                                          |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [setImage](https://developer.android.com/reference/kotlin/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)  

```
fun getText(): CarText?
```

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

|                                                                    See also                                                                     |
|-------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [setText](https://developer.android.com/reference/kotlin/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)  

```
fun getTitle(): CarText?
```

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

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

### hashCode

```
fun hashCode(): Int
```  

### toString

```
fun toString(): String
```