Package com.zello.sdk
Class Audio
java.lang.Object
com.zello.sdk.Audio
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 Summary
Modifier and TypeMethodDescriptiongetMode()Returns the currentAudioModetype.intGets the number of wearable devices that can play audio.booleanisModeAvailable(AudioMode mode) Determines if the passed inAudioModeis available on the device.booleanDetermines if the oldAudioModeis currently in the process of changing to a newAudioMode.voidSets the currentAudioModetomode.voidsetWearableMode(int wearableIndex) Sets the currentAudioModeto theAudioMode.WEARABLEmode using the passed in wearable index.
-
Method Details
-
isModeAvailable
Determines if the passed inAudioModeis 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 oldAudioModeis currently in the process of changing to a newAudioMode.- Returns:
- boolean indicating if the mode is changing.
- See Also:
-
getMode
Returns the currentAudioModetype.- Returns:
AudioModeindicating the current output of audio.- See Also:
-
setMode
Sets the current
AudioModetomode.This method is asynchronous. When the mode has changed,
onAudioStateChanged()is called on theEventsinterface.- Parameters:
mode-AudioModeindicating the new form of audio output.- See Also:
-
setWearableMode
public void setWearableMode(int wearableIndex) Sets the current
AudioModeto theAudioMode.WEARABLEmode using the passed in wearable index.The
wearableIndexcan be between0andgetWearableCount()- 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.
-