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

*** ** * ** ***


```
public final 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 methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/ComponentName.html` | `https://developer.android.com/reference/androidx/mediarouter/media/MediaRouter.ProviderInfo#getComponentName()()` Gets the component name of the media route provider. |
| `@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/mediarouter/media/MediaRouter.ProviderInfo#getPackageName()()` Gets the package name of the media route provider. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/mediarouter/media/MediaRouteProvider` | `@https://developer.android.com/reference/androidx/annotation/MainThread https://developer.android.com/reference/androidx/mediarouter/media/MediaRouter.ProviderInfo#getProviderInstance()()` Gets the provider's underlying `https://developer.android.com/reference/androidx/mediarouter/media/MediaRouteProvider` instance. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/mediarouter/media/MediaRouter.RouteInfo>` | `@https://developer.android.com/reference/androidx/annotation/MainThread https://developer.android.com/reference/androidx/mediarouter/media/MediaRouter.ProviderInfo#getRoutes()()` Gets the `https://developer.android.com/reference/androidx/mediarouter/media/MediaRouter.RouteInfo` published by this route provider. |
| `@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/mediarouter/media/MediaRouter.ProviderInfo#toString()()` |

## Public methods

### getComponentName

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

```
public @NonNull ComponentName getComponentName()
```

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)

```
public @NonNull String getPackageName()
```

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
public @NonNull MediaRouteProvider getProviderInstance()
```

Gets the provider's underlying `https://developer.android.com/reference/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
public @NonNull List<MediaRouter.RouteInfo> getRoutes()
```

Gets the `https://developer.android.com/reference/androidx/mediarouter/media/MediaRouter.RouteInfo` published by this route provider.

Must be called on the main thread.

### toString

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