Stay organized with collections
Save and categorize content based on your preferences.
AudioManager.OnCommunicationDeviceChangedListener
public
static
interface
AudioManager.OnCommunicationDeviceChangedListener
android.media.AudioManager.OnCommunicationDeviceChangedListener
|
Listener registered by client to be notified upon communication audio device change.
See AudioManager.setCommunicationDevice(android.media.AudioDeviceInfo)
.
Summary
Public methods
public abstract void onCommunicationDeviceChanged (AudioDeviceInfo device)
Callback method called upon communication audio device change.
Parameters |
device |
AudioDeviceInfo : the audio device requested for communication use cases.
Can be null on platforms not supporting
PackageManager.FEATURE_TELEPHONY . |
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,["# AudioManager.OnCommunicationDeviceChangedListener\n\nAdded in [API level 31](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nAudioManager.OnCommunicationDeviceChangedListener\n=================================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/media/AudioManager.OnCommunicationDeviceChangedListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nAudioManager.OnCommunicationDeviceChangedListener\n`\n\n\n`\n\n\n`\n\n|-----------------------------------------------------------------|\n| android.media.AudioManager.OnCommunicationDeviceChangedListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nListener registered by client to be notified upon communication audio device change.\nSee [AudioManager.setCommunicationDevice(android.media.AudioDeviceInfo)](/reference/android/media/AudioManager#setCommunicationDevice(android.media.AudioDeviceInfo)).\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onCommunicationDeviceChanged](/reference/android/media/AudioManager.OnCommunicationDeviceChangedListener#onCommunicationDeviceChanged(android.media.AudioDeviceInfo))`(`[AudioDeviceInfo](/reference/android/media/AudioDeviceInfo)` device) ` Callback method called upon communication audio device change. |\n\nPublic methods\n--------------\n\n### onCommunicationDeviceChanged\n\nAdded in [API level 31](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onCommunicationDeviceChanged (AudioDeviceInfo device)\n```\n\nCallback method called upon communication audio device change.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `device` | `AudioDeviceInfo`: the audio device requested for communication use cases. Can be null on platforms not supporting [PackageManager.FEATURE_TELEPHONY](/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY). \u003cbr /\u003e |"]]