# MediaRouter.ProviderInfo

# MediaRouter.ProviderInfo

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/mediarouter/media/MediaRouter.ProviderInfo "View this page in Java")

<br />

```
class MediaRouter.ProviderInfo
```

<br />

*** ** * ** ***

Provides information about a media route provider.

This object may be used to determine which media route provider has published a particular route.

## Summary

|                                                                                                                                                        ### Public functions                                                                                                                                                        |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ComponentName](https://developer.android.com/reference/android/content/ComponentName.html)                                                                                                                                                                                                                                        | [getComponentName](https://developer.android.com/reference/kotlin/androidx/mediarouter/media/MediaRouter.ProviderInfo#getComponentName())`()` Gets the component name of the media route provider.                                                                                                                                                                                                           |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                                                                                                                                                                                                                                  | [getPackageName](https://developer.android.com/reference/kotlin/androidx/mediarouter/media/MediaRouter.ProviderInfo#getPackageName())`()` Gets the package name of the media route provider.                                                                                                                                                                                                                 |
| [MediaRouteProvider](https://developer.android.com/reference/kotlin/androidx/mediarouter/media/MediaRouteProvider)                                                                                                                                                                                                                 | `@`[MainThread](https://developer.android.com/reference/kotlin/androidx/annotation/MainThread) [getProviderInstance](https://developer.android.com/reference/kotlin/androidx/mediarouter/media/MediaRouter.ProviderInfo#getProviderInstance())`()` Gets the provider's underlying[MediaRouteProvider](https://developer.android.com/reference/kotlin/androidx/mediarouter/media/MediaRouteProvider)instance. |
| `(`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[MediaRouter.RouteInfo](https://developer.android.com/reference/kotlin/androidx/mediarouter/media/MediaRouter.RouteInfo)`!>` | `@`[MainThread](https://developer.android.com/reference/kotlin/androidx/annotation/MainThread) [getRoutes](https://developer.android.com/reference/kotlin/androidx/mediarouter/media/MediaRouter.ProviderInfo#getRoutes())`()` Gets the[routes](https://developer.android.com/reference/kotlin/androidx/mediarouter/media/MediaRouter.RouteInfo)published by this route provider.                            |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                                                                                                                                                                                                                                  | [toString](https://developer.android.com/reference/kotlin/androidx/mediarouter/media/MediaRouter.ProviderInfo#toString())`()`                                                                                                                                                                                                                                                                                |

## Public functions

### getComponentName

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

```
fun getComponentName(): ComponentName
```

Gets the component name of the media route provider.  

### getPackageName

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

```
fun getPackageName(): String
```

Gets the package name of the media route provider.  

### getProviderInstance

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

```
@MainThread
fun getProviderInstance(): MediaRouteProvider
```

Gets the provider's underlying[MediaRouteProvider](https://developer.android.com/reference/kotlin/androidx/mediarouter/media/MediaRouteProvider)instance.

Must be called on the main thread.  

### getRoutes

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

```
@MainThread
fun getRoutes(): (Mutable)List<MediaRouter.RouteInfo!>
```

Gets the[routes](https://developer.android.com/reference/kotlin/androidx/mediarouter/media/MediaRouter.RouteInfo)published by this route provider.

Must be called on the main thread.  

### toString

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