@zelloptt/react-native-zello-sdk
    Preparing search index...

    Class Zello

    Zello SDK. This class is a singleton, and can be accessed via Zello.getInstance.

    Hierarchy

    • default
      • Zello
    Index
    accountStatus: ZelloAccountStatus | undefined

    The current account status. undefined when state is not ZelloConnectionState.Connected.

    channels: ZelloChannel[] = []

    The list of ZelloChannel in the contact list. Sorted by name, ascending.

    consoleSettings: ZelloConsoleSettings | undefined

    The console settings for the network. This is only expected to be valid when state is ZelloConnectionState.Connected.

    emergencyChannel: ZelloChannel | undefined

    The configured emergency channel.

    groupConversations: ZelloGroupConversation[] = []

    The list of ZelloGroupConversation in the contact list. Sorted by name, ascending.

    historyVoiceMessage: ZelloHistoryVoiceMessage | undefined

    The currently playing history voice message.

    incomingEmergencies: ZelloIncomingEmergency[] = []

    The list of incoming emergencies. There can be multiple emergencies on the emergency channel at once. Sorted by start timestamp, ascending.

    incomingVoiceMessage: ZelloIncomingVoiceMessage | undefined

    The current incoming voice message.

    outgoingEmergency: ZelloOutgoingEmergency | undefined

    The current outgoing emergency.

    outgoingVoiceMessage: ZelloOutgoingVoiceMessage | undefined

    The current outgoing voice message.

    recents: ZelloRecentEntry[] = []

    The list of recent entries. Sorted by timestamp, descending.

    selectedContact: ZelloContact | undefined

    The currently selected contact.

    state: ZelloConnectionState = ZelloConnectionState.Disconnected

    The current connection state of the SDK.

    users: ZelloUser[] = []

    The list of ZelloUser in the contact list. Sorted by name, ascending.

    • Adds a listener to be invoked when events of the specified type are emitted. An optional calling context may be provided. The data arguments emitted will be passed to the listener function.

      Parameters

      • eventType: string

        Name of the event to listen to

      • listener: (...args: any[]) => any

        Function to invoke when the specified event is emitted

      • Optionalcontext: any

        Optional context object to use when invoking the listener

      Returns EmitterSubscription

    • Destroys the SDK instance and cleans up resources. Call this when you are done using the SDK instance for good (application quit).

      Returns void

    • Emits an event of the given type with the given data. All handlers of that particular type will be notified.

      Parameters

      • eventType: string

        Name of the event to emit

      • ...params: any[]

      Returns void

      emitter.addListener('someEvent', function(message) {
      console.log(message);
      });

      emitter.emit('someEvent', 'abc'); // logs 'abc'
    • Returns the channel with the given name. Case-insensitive.

      Parameters

      • name: string

        The name of the channel to search for.

      Returns ZelloChannel | undefined

      The channel with the given name, or null if no channel with that name exists.

    • Returns the group conversation with the given name. Case-insensitive.

      Parameters

      • name: string

        The name of the group conversation to search for.

      Returns ZelloGroupConversation | undefined

      The group conversation with the given name, or null if no group conversation with that name exists.

    • Returns the image data for the given history image message.

      Parameters

      Returns Promise<string | undefined>

      The image data for the given history image message.

    • Returns the user with the given name. Case-insensitive.

      Parameters

      • name: string

        The name of the user to search for.

      Returns ZelloUser | undefined

      The user with the given name, or null if no user with that name exists.

    • Returns the number of listeners that are currently registered for the given event.

      Parameters

      • eventType: string

        Name of the event to query

      Returns number

    • Removes all of the registered listeners, including those registered as listener maps.

      Parameters

      • OptionaleventType: string

        Optional name of the event whose registered listeners to remove

      Returns void

    • Starts an outgoing emergency to the emergency channel. Upon starting, the user's location will be sent, an alert message will be sent, and a 10-second-long voice message will start recording. This will trigger the ZelloEvent.OUTGOING_EMERGENCY_STARTED event.

      Returns void

    • Stops an incoming emergency started by another user on the emergency channel.

      This requires the emergency channel's ZelloChannelOptions.allowEmergencyEndOthers | allowEmergencyEndOthers option to be true; otherwise this method has no effect.

      On success, this will trigger the ZelloEvent.INCOMING_EMERGENCY_STOPPED event for the emergency.

      Parameters

      Returns void

    • Submits a problem report to Zello. Additionally, please contact us to provide more information on what happened.

      Returns void