> Documentation index: https://developer.android.com/reference/llms.txt

Summary: [Ctors](https://developer.android.com/reference/android/media/MediaRouter.SimpleCallback.md.txt#pubctors) \| [Methods](https://developer.android.com/reference/android/media/MediaRouter.SimpleCallback.md.txt#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/media/MediaRouter.SimpleCallback.md.txt#inhmethods)

# MediaRouter.SimpleCallback

*** ** * ** ***


`
public
static


class
MediaRouter.SimpleCallback
`


`


`

`

extends MediaRouter.Callback


`

`


`

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

<br />

*** ** * ** ***

Stub implementation of `MediaRouter.Callback`.
Each abstract method is defined as a no-op. Override just the ones
you need.

## Summary

| ### Public constructors ||
|---|---|
| ` SimpleCallback() ` |

| ### Public methods ||
|---|---|
| ` void` | ` onRouteAdded(MediaRouter router, MediaRouter.RouteInfo info) ` Called when a route for the specified type was added. |
| ` void` | ` onRouteChanged(MediaRouter router, MediaRouter.RouteInfo info) ` Called when an aspect of the indicated route has changed. |
| ` void` | ` onRouteGrouped(MediaRouter router, MediaRouter.RouteInfo info, MediaRouter.RouteGroup group, int index) ` Called when a route is added to a group. |
| ` void` | ` onRouteRemoved(MediaRouter router, MediaRouter.RouteInfo info) ` Called when a route for the specified type was removed. |
| ` void` | ` onRouteSelected(MediaRouter router, int type, MediaRouter.RouteInfo info) ` Called when the supplied route becomes selected as the active route for the given route type. |
| ` void` | ` onRouteUngrouped(MediaRouter router, MediaRouter.RouteInfo info, MediaRouter.RouteGroup group) ` Called when a route is removed from a group. |
| ` void` | ` onRouteUnselected(MediaRouter router, int type, MediaRouter.RouteInfo info) ` Called when the supplied route becomes unselected as the active route for the given route type. |
| ` void` | ` onRouteVolumeChanged(MediaRouter router, MediaRouter.RouteInfo info) ` Called when a route's volume changes. |

### Inherited methods

From class `

android.media.MediaRouter.Callback

` `
abstract


void` `
onRouteAdded(MediaRouter router, MediaRouter.RouteInfo info)
`

Called when a route for the specified type was added.


`
abstract


void` `
onRouteChanged(MediaRouter router, MediaRouter.RouteInfo info)
`

Called when an aspect of the indicated route has changed.


`
abstract


void` `
onRouteGrouped(MediaRouter router, MediaRouter.RouteInfo info, MediaRouter.RouteGroup group, int index)
`

Called when a route is added to a group.


`


void` `
onRoutePresentationDisplayChanged(MediaRouter router, MediaRouter.RouteInfo info)
`

Called when a route's presentation display changes.


`
abstract


void` `
onRouteRemoved(MediaRouter router, MediaRouter.RouteInfo info)
`

Called when a route for the specified type was removed.


`
abstract


void` `
onRouteSelected(MediaRouter router, int type, MediaRouter.RouteInfo info)
`

Called when the supplied route becomes selected as the active route
for the given route type.


`
abstract


void` `
onRouteUngrouped(MediaRouter router, MediaRouter.RouteInfo info, MediaRouter.RouteGroup group)
`

Called when a route is removed from a group.


`
abstract


void` `
onRouteUnselected(MediaRouter router, int type, MediaRouter.RouteInfo info)
`

Called when the supplied route becomes unselected as the active route
for the given route type.


`
abstract


void` `
onRouteVolumeChanged(MediaRouter router, MediaRouter.RouteInfo info)
`

Called when a route's volume changes.


From class `

java.lang.Object

` `


Object` `
clone()
`

Creates and returns a copy of this object.


`


boolean` `
equals(Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
finalize()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

Class<?>` `
getClass()
`

Returns the runtime class of this `Object`.


`


int` `
hashCode()
`

Returns a hash code value for the object.


`


final

void` `
notify()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
notifyAll()
`

Wakes up all threads that are waiting on this object's monitor.


`


String` `
toString()
`

Returns a string representation of the object.


`


final

void` `
wait(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(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()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


## Public constructors

### SimpleCallback

```
public SimpleCallback ()
```

<br />

<br />

## Public methods

### onRouteAdded

```
public void onRouteAdded (MediaRouter router, 
                MediaRouter.RouteInfo info)
```

Called when a route for the specified type was added.

<br />

| Parameters ||
|---|---|
| `router` | `MediaRouter`: the MediaRouter reporting the event <br /> |
| `info` | `MediaRouter.RouteInfo`: Route that has become available for use <br /> |

### onRouteChanged

```
public void onRouteChanged (MediaRouter router, 
                MediaRouter.RouteInfo info)
```

Called when an aspect of the indicated route has changed.

This will not indicate that the types supported by this route have
changed, only that cosmetic info such as name or status have been updated.

<br />

<br />

| Parameters ||
|---|---|
| `router` | `MediaRouter`: the MediaRouter reporting the event <br /> |
| `info` | `MediaRouter.RouteInfo`: The route that was changed <br /> |

### onRouteGrouped

```
public void onRouteGrouped (MediaRouter router, 
                MediaRouter.RouteInfo info, 
                MediaRouter.RouteGroup group, 
                int index)
```

Called when a route is added to a group.

<br />

| Parameters ||
|---|---|
| `router` | `MediaRouter`: the MediaRouter reporting the event <br /> |
| `info` | `MediaRouter.RouteInfo`: The route that was added <br /> |
| `group` | `MediaRouter.RouteGroup`: The group the route was added to <br /> |
| `index` | `int`: The route index within group that info was added at <br /> |

### onRouteRemoved

```
public void onRouteRemoved (MediaRouter router, 
                MediaRouter.RouteInfo info)
```

Called when a route for the specified type was removed.

<br />

| Parameters ||
|---|---|
| `router` | `MediaRouter`: the MediaRouter reporting the event <br /> |
| `info` | `MediaRouter.RouteInfo`: Route that has been removed from availability <br /> |

### onRouteSelected

```
public void onRouteSelected (MediaRouter router, 
                int type, 
                MediaRouter.RouteInfo info)
```

Called when the supplied route becomes selected as the active route
for the given route type.

<br />

| Parameters ||
|---|---|
| `router` | `MediaRouter`: the MediaRouter reporting the event <br /> |
| `type` | `int`: Type flag set indicating the routes that have been selected <br /> |
| `info` | `MediaRouter.RouteInfo`: Route that has been selected for the given route types <br /> |

### onRouteUngrouped

```
public void onRouteUngrouped (MediaRouter router, 
                MediaRouter.RouteInfo info, 
                MediaRouter.RouteGroup group)
```

Called when a route is removed from a group.

<br />

| Parameters ||
|---|---|
| `router` | `MediaRouter`: the MediaRouter reporting the event <br /> |
| `info` | `MediaRouter.RouteInfo`: The route that was removed <br /> |
| `group` | `MediaRouter.RouteGroup`: The group the route was removed from <br /> |

### onRouteUnselected

```
public void onRouteUnselected (MediaRouter router, 
                int type, 
                MediaRouter.RouteInfo info)
```

Called when the supplied route becomes unselected as the active route
for the given route type.

<br />

| Parameters ||
|---|---|
| `router` | `MediaRouter`: the MediaRouter reporting the event <br /> |
| `type` | `int`: Type flag set indicating the routes that have been unselected <br /> |
| `info` | `MediaRouter.RouteInfo`: Route that has been unselected for the given route types <br /> |

### onRouteVolumeChanged

```
public void onRouteVolumeChanged (MediaRouter router, 
                MediaRouter.RouteInfo info)
```

Called when a route's volume changes.

<br />

| Parameters ||
|---|---|
| `router` | `MediaRouter`: the MediaRouter reporting the event <br /> |
| `info` | `MediaRouter.RouteInfo`: The route with altered volume <br /> |