Skip to content

AudioDevice

Lejla Solak edited this page Feb 10, 2025 · 3 revisions



getAudioDeviceType()

Description

Getter for the audioDeviceType field.

Arguments

  • none

Returns

  • AudioDeviceType - The value of the audioDeviceType field, which represents an enum value of the audio device type.

Example

@Override
public void onActiveAudioDeviceChanged(@NonNull ActiveAudioDeviceChangedEvent activeAudioDeviceChangedEvent) {
    AudioDeviceType audioDeviceType = activeAudioDeviceChangedEvent.getActiveAudioDevice().getAudioDeviceType();
}



getName()

Description

Getter for the name field.

Arguments

  • none

Returns

  • String - The value of the name field, which represents a human-readable name describing the audio device.

Example

@Override
public void onActiveAudioDeviceChanged(@NonNull ActiveAudioDeviceChangedEvent activeAudioDeviceChangedEvent) {
    String name = activeAudioDeviceChangedEvent.getActiveAudioDevice().getName();
}



getPriorityLevel()

Description

Getter for the priorityLevel field.

Arguments

  • none

Returns

  • int - The value of the priorityLevel field, which represents the priority level of the audio device. The value ranges from 1 to 4, where 1 represents the lowest priority and 4 represents the highest priority level.

Example

@Override
public void onActiveAudioDeviceChanged(@NonNull ActiveAudioDeviceChangedEvent activeAudioDeviceChangedEvent) {
    int priorityLevel = activeAudioDeviceChangedEvent.getActiveAudioDevice().getPriorityLevel();
}

Tutorials

Migration guides

Reference documentation

Clone this wiki locally