Stay organized with collections
Save and categorize content based on your preferences.
OnRoutingChangedListener
interface OnRoutingChangedListener
Defines the interface by which applications can receive notifications of routing changes for the associated AudioRouting
.
Summary
Public methods |
abstract Unit |
|
Public methods
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# AudioRouting.OnRoutingChangedListener\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnRoutingChangedListener\n========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/AudioRouting.OnRoutingChangedListener \"View this page in Java\") \n\n```\ninterface OnRoutingChangedListener\n```\n\n|----------------------------------------------------------|\n| [android.media.AudioRouting.OnRoutingChangedListener](#) |\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [AudioRecord.OnRoutingChangedListener](/reference/kotlin/android/media/AudioRecord.OnRoutingChangedListener), [AudioTrack.OnRoutingChangedListener](/reference/kotlin/android/media/AudioTrack.OnRoutingChangedListener) |--------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [AudioRecord.OnRoutingChangedListener](/reference/kotlin/android/media/AudioRecord.OnRoutingChangedListener) | Defines the interface by which applications can receive notifications of routing changes for the associated [AudioRecord](/reference/kotlin/android/media/AudioRecord). | | [AudioTrack.OnRoutingChangedListener](/reference/kotlin/android/media/AudioTrack.OnRoutingChangedListener) | Defines the interface by which applications can receive notifications of routing changes for the associated [AudioTrack](/reference/kotlin/android/media/AudioTrack). | |\n\nDefines the interface by which applications can receive notifications of routing changes for the associated [AudioRouting](/reference/kotlin/android/media/AudioRouting).\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onRoutingChanged](#onRoutingChanged(android.media.AudioRouting))`(`router:` `[AudioRouting](/reference/kotlin/android/media/AudioRouting)!`)` \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### onRoutingChanged\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onRoutingChanged(router: AudioRouting!): Unit\n```"]]