Package com.zello.sdk

Class Audio

java.lang.Object
com.zello.sdk.Audio

public class Audio extends Object

Manages AudioMode used by Zello Work app.

To use, retrieve the current Audio instance using the Zello.getAudio() method. For specific usage, please see the sample projects.

  • Method Details

    • isModeAvailable

      public boolean isModeAvailable(@NonNull AudioMode mode)
      Determines if the passed in AudioMode is available on the device.
      Parameters:
      mode - The mode to test availability for.
      Returns:
      boolean indicating if the mode is available for the device.
    • isModeChanging

      public boolean isModeChanging()
      Determines if the old AudioMode is currently in the process of changing to a new AudioMode.
      Returns:
      boolean indicating if the mode is changing.
      See Also:
    • getMode

      @NonNull public AudioMode getMode()
      Returns the current AudioMode type.
      Returns:
      AudioMode indicating the current output of audio.
      See Also:
    • setMode

      public void setMode(@NonNull AudioMode mode)

      Sets the current AudioMode to mode.

      This method is asynchronous. When the mode has changed, onAudioStateChanged() is called on the Events interface.

      Parameters:
      mode - AudioMode indicating the new form of audio output.
      See Also:
    • setWearableMode

      public void setWearableMode(int wearableIndex)

      Sets the current AudioMode to the AudioMode.WEARABLE mode using the passed in wearable index.

      The wearableIndex can be between 0 and getWearableCount()

      Parameters:
      wearableIndex - The index of the wearable device to set the output of audio to.
    • getWearableCount

      public int getWearableCount()
      Gets the number of wearable devices that can play audio.
      Returns:
      The number of wearables connected to the device.