Stay organized with collections
Save and categorize content based on your preferences.
OnRoutingChangedListener
interface OnRoutingChangedListener : AudioRouting.OnRoutingChangedListener
Defines the interface by which applications can receive notifications of routing changes for the associated AudioRecord
.
Summary
Public methods |
abstract Unit |
Called when the routing of an AudioRecord changes from either and explicit or policy rerouting.
|
open Unit |
|
Public methods
onRoutingChanged
abstract fun onRoutingChanged(audioRecord: AudioRecord!): Unit
Deprecated: Deprecated in Java.
Called when the routing of an AudioRecord changes from either and explicit or policy rerouting. Use getRoutedDevice()
to retrieve the newly routed-from device.
onRoutingChanged
open fun onRoutingChanged(router: AudioRouting!): Unit
Deprecated: Deprecated in Java.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# AudioRecord.OnRoutingChangedListener\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated 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/AudioRecord.OnRoutingChangedListener \"View this page in Java\") \n\n```\ninterface OnRoutingChangedListener : AudioRouting.OnRoutingChangedListener\n```\n\n|---------------------------------------------------------|\n| [android.media.AudioRecord.OnRoutingChangedListener](#) |\n\n*** ** * ** ***\n\n| **This interface was deprecated in API level 24.**\n|\n| users should switch to the general purpose [AudioRouting.OnRoutingChangedListener](/reference/kotlin/android/media/AudioRouting.OnRoutingChangedListener) class instead.\n\nDefines the interface by which applications can receive notifications of routing changes for the associated [AudioRecord](/reference/kotlin/android/media/AudioRecord).\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.AudioRecord))`(`audioRecord:` `[AudioRecord](/reference/kotlin/android/media/AudioRecord)!`)` Called when the routing of an AudioRecord changes from either and explicit or policy rerouting. |\n| open [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 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onRoutingChanged(audioRecord: AudioRecord!): Unit\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nCalled when the routing of an AudioRecord changes from either and explicit or policy rerouting. Use [getRoutedDevice()](/reference/kotlin/android/media/AudioRecord#getRoutedDevice()) to retrieve the newly routed-from device. \n\n### onRoutingChanged\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onRoutingChanged(router: AudioRouting!): Unit\n```\n\n**Deprecated:** *Deprecated in Java.*"]]