Google berkomitmen untuk mendorong terwujudnya keadilan ras bagi komunitas Kulit Hitam. Lihat caranya.

CarAudioManager.CarVolumeCallback

public static abstract class CarAudioManager.CarVolumeCallback
extends Object

java.lang.Object
   ↳ android.car.media.CarAudioManager.CarVolumeCallback


Callback interface to receive volume change events in a car. Extend this class and register it with CarAudioManager.registerCarVolumeCallback(android.car.media.CarAudioManager.CarVolumeCallback) and unregister it via CarAudioManager.unregisterCarVolumeCallback(android.car.media.CarAudioManager.CarVolumeCallback)

Summary

Public constructors

CarVolumeCallback()

Public methods

void onGroupVolumeChanged(int zoneId, int groupId, int flags)

This is called whenever a group volume is changed.

void onMasterMuteChanged(int zoneId, int flags)

This is called whenever the master mute state is changed.

Inherited methods

Public constructors

CarVolumeCallback

public CarVolumeCallback ()

Public methods

onGroupVolumeChanged

Added in API level 29
public void onGroupVolumeChanged (int zoneId, 
                int groupId, 
                int flags)

This is called whenever a group volume is changed. The changed-to volume index is not included, the caller is encouraged to get the current group volume index via CarAudioManager.

Parameters
zoneId int: Id of the audio zone that volume change happens

groupId int: Id of the volume group that volume is changed

flags int: see AudioManager for flag definitions

onMasterMuteChanged

Added in API level 29
public void onMasterMuteChanged (int zoneId, 
                int flags)

This is called whenever the master mute state is changed. The changed-to master mute state is not included, the caller is encouraged to get the current master mute state via AudioManager.

Parameters
zoneId int: Id of the audio zone that master mute state change happens

flags int: see AudioManager for flag definitions