docs/doc/reference/com/google/android/exoplayer2/audio/AudioCapabilitiesReceiver.html
Package com.google.android.exoplayer2.audio
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classAudioCapabilitiesReceiverextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Receives broadcast events indicating changes to the device's audio capabilities, notifying a AudioCapabilitiesReceiver.Listener when audio capability changes occur.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static interface | AudioCapabilitiesReceiver.Listener |
Deprecated.
Listener notified when audio capabilities change. |
Constructors | Constructor | Description |
| --- | --- |
| AudioCapabilitiesReceiver(Context context, AudioCapabilitiesReceiver.Listener listener) |
Deprecated.
|
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| AudioCapabilities | register() |
Deprecated.
Registers the receiver, meaning it will notify the listener when audio capability changes occur.
|
| void | unregister() |
Deprecated.
Unregisters the receiver, meaning it will no longer notify the listener when audio capability changes occur. |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public AudioCapabilitiesReceiver([Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context,[AudioCapabilitiesReceiver.Listener](AudioCapabilitiesReceiver.Listener.html "interface in com.google.android.exoplayer2.audio")listener)
Deprecated.
Parameters:context - A context for registering the receiver.listener - The listener to notify when audio capabilities change.
-
public[AudioCapabilities](AudioCapabilities.html "class in com.google.android.exoplayer2.audio")register()
Deprecated.
Registers the receiver, meaning it will notify the listener when audio capability changes occur. The current audio capabilities will be returned. It is important to call unregister() when the receiver is no longer required.
Returns:The current audio capabilities for the device.
-
public void unregister()
Deprecated.
Unregisters the receiver, meaning it will no longer notify the listener when audio capability changes occur.