Stay organized with collections
Save and categorize content based on your preferences.
AudioRecord.OnRoutingChangedListener
public
static
interface
AudioRecord.OnRoutingChangedListener
implements
AudioRouting.OnRoutingChangedListener
android.media.AudioRecord.OnRoutingChangedListener
|
This interface was deprecated
in API level 24.
users should switch to the general purpose
AudioRouting.OnRoutingChangedListener
class instead.
Defines the interface by which applications can receive notifications of
routing changes for the associated AudioRecord
.
Summary
Public methods
public void onRoutingChanged (AudioRouting router)
Parameters |
router |
AudioRouting |
public abstract void onRoutingChanged (AudioRecord audioRecord)
Called when the routing of an AudioRecord changes from either and
explicit or policy rerouting. Use AudioRecord.getRoutedDevice()
to
retrieve the newly routed-from device.
Parameters |
audioRecord |
AudioRecord |
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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nDeprecated in [API level\n24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nAudioRecord.OnRoutingChangedListener\n====================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/media/AudioRecord.OnRoutingChangedListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nAudioRecord.OnRoutingChangedListener\n`\n\n\n`\n\n\nimplements\n\n`[AudioRouting.OnRoutingChangedListener](/reference/android/media/AudioRouting.OnRoutingChangedListener)`\n\n\n`\n\n|----------------------------------------------------|\n| android.media.AudioRecord.OnRoutingChangedListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\n**This interface was deprecated\nin API level 24.** \n\nusers should switch to the general purpose\n[AudioRouting.OnRoutingChangedListener](/reference/android/media/AudioRouting.OnRoutingChangedListener) class instead.\n\nDefines the interface by which applications can receive notifications of\nrouting changes for the associated [AudioRecord](/reference/android/media/AudioRecord).\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` default void` | ` `[onRoutingChanged](/reference/android/media/AudioRecord.OnRoutingChangedListener#onRoutingChanged(android.media.AudioRouting))`(`[AudioRouting](/reference/android/media/AudioRouting)` router) ` |\n| ` abstract void` | ` `[onRoutingChanged](/reference/android/media/AudioRecord.OnRoutingChangedListener#onRoutingChanged(android.media.AudioRecord))`(`[AudioRecord](/reference/android/media/AudioRecord)` audioRecord) ` Called when the routing of an AudioRecord changes from either and explicit or policy rerouting. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From interface ` `[android.media.AudioRouting.OnRoutingChangedListener](/reference/android/media/AudioRouting.OnRoutingChangedListener)` ` |------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void` | ` `[onRoutingChanged](/reference/android/media/AudioRouting.OnRoutingChangedListener#onRoutingChanged(android.media.AudioRouting))`(`[AudioRouting](/reference/android/media/AudioRouting)` router) ` | ||\n\nPublic methods\n--------------\n\n### onRoutingChanged\n\nAdded in [API level 24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nDeprecated in [API level\n24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic void onRoutingChanged (AudioRouting router)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|-----------------------|\n| `router` | `AudioRouting` \u003cbr /\u003e |\n\n### onRoutingChanged\n\nAdded in [API level 23](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onRoutingChanged (AudioRecord audioRecord)\n```\n\nCalled when the routing of an AudioRecord changes from either and\nexplicit or policy rerouting. Use [AudioRecord.getRoutedDevice()](/reference/android/media/AudioRecord#getRoutedDevice()) to\nretrieve the newly routed-from device.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------------|----------------------|\n| `audioRecord` | `AudioRecord` \u003cbr /\u003e |"]]