# ConversationItem

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

*** ** * ** ***


```
@CarProtocol
@RequiresCarApi(value = 7)
class ConversationItem : Item
```

<br />

*** ** * ** ***

Represents a text-based conversation (e.g. IM/SMS messages).

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationItem.Builder` A builder for `https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationItem` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationItem#equals(java.lang.Object)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/car/app/model/Action!>` | `https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationItem#getActions()()` Returns the list of additional actions. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationCallbackDelegate` | `https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationItem#getConversationCallbackDelegate()()` Returns host-\>client callbacks for this conversation |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon?` | `https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationItem#getIcon()()` Returns a `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon` for the conversation, or `null` if not set |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationItem#getId()()` Returns a unique identifier for the conversation |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/CarMessage!>` | `https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationItem#getMessages()()` Returns a list of messages for this `https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationItem` |
| `https://developer.android.com/reference/kotlin/androidx/core/app/Person` | `https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationItem#getSelf()()` Returns a `https://developer.android.com/reference/kotlin/androidx/core/app/Person` for the conversation |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText` | `https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationItem#getTitle()()` Returns the title of the conversation |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationItem#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationItem#isGroupConversation()()` Returns whether this conversation involves 3+ participants (a "group" conversation) |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 8) https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationItem#isIndexable()()` Returns whether this item can be included in indexed lists. |

## Public functions

### equals

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

### getActions

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

```
fun getActions(): (Mutable)List<Action!>
```

Returns the list of additional actions.

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

### getConversationCallbackDelegate

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

```
fun getConversationCallbackDelegate(): ConversationCallbackDelegate
```

Returns host-\>client callbacks for this conversation

### getIcon

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

```
fun getIcon(): CarIcon?
```

Returns a `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIcon` for the conversation, or `null` if not set

### getId

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

```
fun getId(): String
```

Returns a unique identifier for the conversation

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationItem.Builder#setId(java.lang.String)` |   |

### getMessages

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

```
fun getMessages(): (Mutable)List<CarMessage!>
```

Returns a list of messages for this `https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationItem`

### getSelf

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

```
fun getSelf(): Person
```

Returns a `https://developer.android.com/reference/kotlin/androidx/core/app/Person` for the conversation

### getTitle

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

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

Returns the title of the conversation

### hashCode

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

### isGroupConversation

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

```
fun isGroupConversation(): Boolean
```

Returns whether this conversation involves 3+ participants (a "group" conversation)

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationItem.Builder#setGroupConversation(boolean)` |   |

### isIndexable

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

```
@RequiresCarApi(value = 8)
fun isIndexable(): Boolean
```

Returns whether this item can be included in indexed lists.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/messaging/model/ConversationItem.Builder#setIndexable(boolean)` |   |