Added in API level 23
Deprecated in API level 24

AudioTrack.OnRoutingChangedListener


public static interface AudioTrack.OnRoutingChangedListener
implements AudioRouting.OnRoutingChangedListener

android.media.AudioTrack.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 AudioTrack.

Summary

Public methods

abstract void onRoutingChanged(AudioTrack audioTrack)

Called when the routing of an AudioTrack changes from either and explicit or policy rerouting.

default void onRoutingChanged(AudioRouting router)

Inherited methods

Public methods

onRoutingChanged

Added in API level 23
public abstract void onRoutingChanged (AudioTrack audioTrack)

Called when the routing of an AudioTrack changes from either and explicit or policy rerouting. Use AudioTrack.getRoutedDevice() to retrieve the newly routed-to device.

Parameters
audioTrack AudioTrack

onRoutingChanged

Added in API level 24
Deprecated in API level 24
public void onRoutingChanged (AudioRouting router)

Parameters
router AudioRouting