# SuggestedDeviceInfo

Artifact: [androidx.mediarouter:mediarouter](https://developer.android.com/jetpack/androidx/releases/mediarouter) [View Source](https://cs.android.com/search?q=file:androidx/mediarouter/media/SuggestedDeviceInfo.java+class:androidx.mediarouter.media.SuggestedDeviceInfo) Added in [1.9.0-rc01](https://developer.android.com/jetpack/androidx/releases/mediarouter#1.9.0-rc01)

*** ** * ** ***


```
class SuggestedDeviceInfo
```

<br />

*** ** * ** ***

Allows applications to suggest routes to the user (for example, in the System UI Output Switcher).

Suggested devices are used to transfer the current media session from one device to another.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/mediarouter/media/MediaRouter#setDeviceSuggestions(java.util.List<androidx.mediarouter.media.MediaRouter.RouteInfo>)` |   |
| `https://developer.android.com/reference/kotlin/androidx/mediarouter/media/MediaRouter#clearDeviceSuggestions()` |   |

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/mediarouter/media/SuggestedDeviceInfo.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/mediarouter/media/SuggestedDeviceInfo`. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/mediarouter/media/SuggestedDeviceInfo#getDeviceDisplayName()()` Returns the display name of the suggested device. |
| `https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/kotlin/androidx/mediarouter/media/SuggestedDeviceInfo#getExtras()()` Returns the `https://developer.android.com/reference/android/os/Bundle.html` of the suggested device set via `https://developer.android.com/reference/kotlin/androidx/mediarouter/media/SuggestedDeviceInfo.Builder#setExtras(android.os.Bundle)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/mediarouter/media/SuggestedDeviceInfo#getRouteId()()` Returns the id of the suggested device. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/mediarouter/media/SuggestedDeviceInfo#getType()()` Returns the `https://developer.android.com/reference/kotlin/androidx/mediarouter/media/MediaRouter.RouteInfo.DeviceType` of the suggested device. |

## Public functions

### getDeviceDisplayName

Added in [1.9.0-rc01](https://developer.android.com/jetpack/androidx/releases/mediarouter#1.9.0-rc01)

```
fun getDeviceDisplayName(): String
```

Returns the display name of the suggested device.

### getExtras

Added in [1.9.0-rc01](https://developer.android.com/jetpack/androidx/releases/mediarouter#1.9.0-rc01)

```
fun getExtras(): Bundle
```

Returns the `https://developer.android.com/reference/android/os/Bundle.html` of the suggested device set via `https://developer.android.com/reference/kotlin/androidx/mediarouter/media/SuggestedDeviceInfo.Builder#setExtras(android.os.Bundle)`.

### getRouteId

Added in [1.9.0-rc01](https://developer.android.com/jetpack/androidx/releases/mediarouter#1.9.0-rc01)

```
fun getRouteId(): String
```

Returns the id of the suggested device.

### getType

Added in [1.9.0-rc01](https://developer.android.com/jetpack/androidx/releases/mediarouter#1.9.0-rc01)

```
fun getType(): Int
```

Returns the `https://developer.android.com/reference/kotlin/androidx/mediarouter/media/MediaRouter.RouteInfo.DeviceType` of the suggested device.