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 currentAudioMode
type.int
Gets the number of wearable devices that can play audio.boolean
isModeAvailable
(AudioMode mode) Determines if the passed inAudioMode
is available on the device.boolean
Determines if the oldAudioMode
is currently in the process of changing to a newAudioMode
.void
Sets the currentAudioMode
tomode
.void
setWearableMode
(int wearableIndex) Sets the currentAudioMode
to theAudioMode.WEARABLE
mode using the passed in wearable index.
-
Method Details
-
isModeAvailable
Determines if the passed inAudioMode
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 oldAudioMode
is currently in the process of changing to a newAudioMode
.- Returns:
- boolean indicating if the mode is changing.
- See Also:
-
getMode
Returns the currentAudioMode
type.- Returns:
AudioMode
indicating the current output of audio.- See Also:
-
setMode
Sets the current
AudioMode
tomode
.This method is asynchronous. When the mode has changed,
onAudioStateChanged()
is called on theEvents
interface.- Parameters:
mode
-AudioMode
indicating the new form of audio output.- See Also:
-
setWearableMode
public void setWearableMode(int wearableIndex) Sets the current
AudioMode
to theAudioMode.WEARABLE
mode using the passed in wearable index.The
wearableIndex
can be between0
andgetWearableCount()
- 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.
-