# MediaRouter.RouteCategory

Added in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Methods](https://developer.android.com/reference/android/media/MediaRouter.RouteCategory#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/media/MediaRouter.RouteCategory#inhmethods)  

# MediaRouter.RouteCategory

*** ** * ** ***

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

`
public
static


class
MediaRouter.RouteCategory
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|-----------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.media.MediaRouter.RouteCategory |

<br />

*** ** * ** ***

Definition of a category of routes. All routes belong to a category.

## Summary

|                                                                                                                                                                                                                                                                                                    ### Public methods                                                                                                                                                                                                                                                                                                    ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[CharSequence](https://developer.android.com/reference/java/lang/CharSequence)                                                                                           | ` `[getName](https://developer.android.com/reference/android/media/MediaRouter.RouteCategory#getName())`() `                                                                                                                                                                                                                                                                                                                                |
| ` `[CharSequence](https://developer.android.com/reference/java/lang/CharSequence)                                                                                           | ` `[getName](https://developer.android.com/reference/android/media/MediaRouter.RouteCategory#getName(android.content.Context))`(`[Context](https://developer.android.com/reference/android/content/Context)` context) ` Return the properly localized/configuration dependent name of this RouteCategory.                                                                                                                                   |
| ` `[List](https://developer.android.com/reference/java/util/List)`<`[MediaRouter.RouteInfo](https://developer.android.com/reference/android/media/MediaRouter.RouteInfo)`>` | ` `[getRoutes](https://developer.android.com/reference/android/media/MediaRouter.RouteCategory#getRoutes(java.util.List<android.media.MediaRouter.RouteInfo>))`(`[List](https://developer.android.com/reference/java/util/List)`<`[MediaRouter.RouteInfo](https://developer.android.com/reference/android/media/MediaRouter.RouteInfo)`> out) ` Return the current list of routes in this category that have been added to the MediaRouter. |
| ` int`                                                                                                                                                                      | ` `[getSupportedTypes](https://developer.android.com/reference/android/media/MediaRouter.RouteCategory#getSupportedTypes())`() `                                                                                                                                                                                                                                                                                                            |
| ` boolean`                                                                                                                                                                  | ` `[isGroupable](https://developer.android.com/reference/android/media/MediaRouter.RouteCategory#isGroupable())`() ` Return whether or not this category supports grouping.                                                                                                                                                                                                                                                                 |
| ` `[String](https://developer.android.com/reference/java/lang/String)                                                                                                       | ` `[toString](https://developer.android.com/reference/android/media/MediaRouter.RouteCategory#toString())`() ` Returns a string representation of the object.                                                                                                                                                                                                                                                                               |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Public methods

### getName

Added in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public CharSequence getName ()
```

<br />

<br />

|                                                        Returns                                                         ||
|--------------------------------------------------------------------------------|----------------------------------------|
| [CharSequence](https://developer.android.com/reference/java/lang/CharSequence) | the name of this route category <br /> |

### getName

Added in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public CharSequence getName (Context context)
```

Return the properly localized/configuration dependent name of this RouteCategory.

<br />

|                           Parameters                           ||
|-----------|-----------------------------------------------------|
| `context` | `Context`: Context to resolve name resources <br /> |

|                                                        Returns                                                         ||
|--------------------------------------------------------------------------------|----------------------------------------|
| [CharSequence](https://developer.android.com/reference/java/lang/CharSequence) | the name of this route category <br /> |

### getRoutes

Added in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public List<MediaRouter.RouteInfo> getRoutes (List<MediaRouter.RouteInfo> out)
```

Return the current list of routes in this category that have been added to the MediaRouter.

This list will not include routes that are nested within RouteGroups. A RouteGroup is treated as a single route within its category.

<br />

<br />

|                                                                                                                                         Parameters                                                                                                                                          ||
|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `out` | `List`: a List to fill with the routes in this category. If this parameter is non-null, it will be cleared, filled with the current routes with this category, and returned. If this parameter is null, a new List will be allocated to report the category's current routes. <br /> |

|                                                                                                                              Returns                                                                                                                              ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|
| [List](https://developer.android.com/reference/java/util/List)`<`[MediaRouter.RouteInfo](https://developer.android.com/reference/android/media/MediaRouter.RouteInfo)`>` | A list with the routes in this category that have been added to the MediaRouter. <br /> |

### getSupportedTypes

Added in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public int getSupportedTypes ()
```

<br />

<br />

|                                   Returns                                    ||
|-------|-----------------------------------------------------------------------|
| `int` | Flag set describing the route types supported by this category <br /> |

### isGroupable

Added in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean isGroupable ()
```

Return whether or not this category supports grouping.

If this method returns true, all routes obtained from this category via calls to[MediaRouter.getRouteAt(int)](https://developer.android.com/reference/android/media/MediaRouter#getRouteAt(int))will be[MediaRouter.RouteGroup](https://developer.android.com/reference/android/media/MediaRouter.RouteGroup)s.

<br />

<br />

|                     Returns                      ||
|-----------|---------------------------------------|
| `boolean` | true if this category supports <br /> |

### toString

Added in[API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public String toString ()
```

Returns a string representation of the object.

<br />

|                                                      Returns                                                      ||
|--------------------------------------------------------------------|-----------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | a string representation of the object. <br /> |