# AudioRouting.OnRoutingChangedListener

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

# OnRoutingChangedListener

*** ** * ** ***

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

```
interface OnRoutingChangedListener
```

|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [android.media.AudioRouting.OnRoutingChangedListener](https://developer.android.com/reference/kotlin/android/media/AudioRouting.OnRoutingChangedListener#) |

|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Direct Subclasses [AudioRecord.OnRoutingChangedListener](https://developer.android.com/reference/kotlin/android/media/AudioRecord.OnRoutingChangedListener),[AudioTrack.OnRoutingChangedListener](https://developer.android.com/reference/kotlin/android/media/AudioTrack.OnRoutingChangedListener) |-------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [AudioRecord.OnRoutingChangedListener](https://developer.android.com/reference/kotlin/android/media/AudioRecord.OnRoutingChangedListener) | Defines the interface by which applications can receive notifications of routing changes for the associated[AudioRecord](https://developer.android.com/reference/kotlin/android/media/AudioRecord). | | [AudioTrack.OnRoutingChangedListener](https://developer.android.com/reference/kotlin/android/media/AudioTrack.OnRoutingChangedListener)   | Defines the interface by which applications can receive notifications of routing changes for the associated[AudioTrack](https://developer.android.com/reference/kotlin/android/media/AudioTrack).   | |

Defines the interface by which applications can receive notifications of routing changes for the associated[AudioRouting](https://developer.android.com/reference/kotlin/android/media/AudioRouting).

## Summary

|                                                                                                                                                                               Public methods                                                                                                                                                                               ||
|--------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onRoutingChanged](https://developer.android.com/reference/kotlin/android/media/AudioRouting.OnRoutingChangedListener#onRoutingChanged(android.media.AudioRouting))`(`router:` `[AudioRouting](https://developer.android.com/reference/kotlin/android/media/AudioRouting)!`)` <br /> |

## Public methods

### onRoutingChanged

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

```
abstract fun onRoutingChanged(router: AudioRouting!): Unit
```