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 | 
      onGroupMuteChanged(int zoneId, int groupId, int flags)
      This is called whenever a group mute state is changed. | 
| 
        
        
        
        
        
        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 global mute state is changed. | 
| Inherited methods | |
|---|---|
Public constructors
CarVolumeCallback
public CarVolumeCallback ()
Public methods
onGroupMuteChanged
public void onGroupMuteChanged (int zoneId, 
                int groupId, 
                int flags)This is called whenever a group mute state is changed. The changed-to mute state is not included, the caller is encouraged to get the current group mute state via CarAudioManager.
Notes:
- If CarAudioManager.AUDIO_FEATURE_VOLUME_GROUP_MUTINGis enabled this will be triggered on mute changes. Otherwise, car audio mute changes will triggeronMasterMuteChanged(int, int)
- If both CarVolumeCallbackandCarVolumeGroupEventCallbackare registered by the same app, then volume group mute changes are only propagated throughCarVolumeGroupEventCallback(until it is unregistered)
- Apps are encouraged to migrate to the new callback
     CarVolumeGroupEventCallback
| 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: seeAudioManagerfor flag definitions | 
onGroupVolumeChanged
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.
Notes:
- If both CarVolumeCallbackandCarVolumeGroupEventCallbackare registered by the same app, then volume group index changes are only propagated throughCarVolumeGroupEventCallback(until it is unregistered)
- Apps are encouraged to migrate to the new callback
     CarVolumeGroupEventCallback
| 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: seeAudioManagerfor flag definitions | 
onMasterMuteChanged
public void onMasterMuteChanged (int zoneId, 
                int flags)This is called whenever the global mute state is changed. The changed-to global mute state is not included, the caller is encouraged to get the current global mute state via AudioManager.
Note: If CarAudioManager.AUDIO_FEATURE_VOLUME_GROUP_MUTING is disabled
 this will be triggered on mute changes. Otherwise, car audio mute changes will trigger
 onGroupMuteChanged(int, int, int)
| Parameters | |
|---|---|
| zoneId | int: Id of the audio zone that global mute state change happens | 
| flags | int: seeAudioManagerfor flag definitions | 
