Interface Events
Events
interface enables monitoring of Zello SDK state and property changes-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called when theAppState
changes.void
Called when the the state of theAudio
changes.void
onBluetoothAccessoryStateChanged
(BluetoothAccessoryType type, BluetoothAccessoryState state, String name, String description) Called when a Bluetooth accessory connection state changes.void
Called when theContacts
for the user changes.void
void
Called when the state of either theMessageOut
orMessageIn
changes.void
Called when an invocation of theZello.beginMessage()
method fails because the microphone permission hasn't been granted.void
Called when the selected contact changes.
-
Method Details
-
onSelectedContactChanged
void onSelectedContactChanged()Called when the selected contact changes.
This method is invoked on the UI thread. To retrieve the newly selected contact, call the
Zello.getSelectedContact(Contact)
method. -
onMessageStateChanged
void onMessageStateChanged()Called when the state of either the
MessageOut
orMessageIn
changes.This method is invoked on the UI thread. To retrieve the current message state, call the
Zello.getMessageIn(MessageIn)
andZello.getMessageOut(MessageOut)
methods. -
onAppStateChanged
void onAppStateChanged()Called when the
AppState
changes.This method is invoked on the UI thread. To retrieve the current
AppState
, call theZello.getAppState(AppState)
method.- See Also:
-
onLastContactsTabChanged
- Parameters:
tab
- The tab that changed.- See Also:
-
onContactsChanged
void onContactsChanged()Called when the
Contacts
for the user changes.This method is invoked on the UI thread. To retrieve the current
Contacts
snapshot, call theZello.getContacts()
method.When dealing with large contact lists (1000+ contacts), the best approach is to run both
getContacts()
and any contact processing in a background thread and then post the result to UI thread for display.- See Also:
-
onAudioStateChanged
void onAudioStateChanged()Called when the the state of the
Audio
changes.This method is invoked on the UI thread. To retrieve the current
Audio
, call theZello.getAudio()
method.- See Also:
-
onMicrophonePermissionNotGranted
void onMicrophonePermissionNotGranted()Called when an invocation of the
Zello.beginMessage()
method fails because the microphone permission hasn't been granted.This method is invoked on the UI thread.
The normal use case for handling this error would be to call
Zello.showMicrophonePermissionDialog()
. However, it is the responsibility of the app using the SDK to determine if they should handle this error or not. For example, if there are multiple apps using the SDK, they will all receive this callback. TheZello.showMicrophonePermissionDialog()
method should likely only be on one of these apps (the one in the foreground). -
onBluetoothAccessoryStateChanged
void onBluetoothAccessoryStateChanged(@NonNull BluetoothAccessoryType type, @NonNull BluetoothAccessoryState state, @Nullable String name, @Nullable String description) Called when a Bluetooth accessory connection state changes.
- Parameters:
type
- Type of the device.state
- New state of the device.name
- Name of the device.description
- A description of the event that can be shown to the user.- See Also:
-