Interface UnbluConversation


public interface UnbluConversation
Defines the contract for managing conversations in Unblu. This interface provides methods to manage the lifecycle of a conversation, including opening and closing conversations, handling state changes, managing voice and video calls, and controlling mobile co-browsing sessions. It allows for real-time updates on the status of conversations and calls, and offers callbacks for success and failure scenarios.
  • Method Details

    • getId

      String getId()
      Returns:
      A String containing the conversation's ID
    • displayAsModalView

      void displayAsModalView(UnbluAnimationData animSource)
      Displays this conversation via the configured modal view handler.
    • isOpen

      io.reactivex.rxjava3.core.Observable<Boolean> isOpen()
      Triggered whenever this conversation opens/closes with Boolean value This Observable will always emit the current value
      Returns:
      Observable
    • isOpenValue

      Boolean isOpenValue()
      Returns:
      true if the conversation is currently open
    • open

      Opens the conversation. Any conversation that was open previously is replaced by this conversation.
      If the Unblu View isn't visible, the conversation is displayed as soon as the Unblu View is opened.
      Parameters:
      success - : A callback returning a void result when the conversation was opened
      failure - : A callback returning OpenConversationErrorType if the request fails
    • close

      Closes the conversation. If the Unblu View is visible, the conversation overview is displayed.
      Parameters:
      success - : A callback returning a void result
      failure - : A callback returning OpenConversationOverviewErrorType if the request fails
    • isCallActiveValue

      boolean isCallActiveValue()
      Returns:
      true if a call is active for the conversation.
      If the `CallModule` isn't registered, the method always returns false.
    • isCallActive

      io.reactivex.rxjava3.core.Observable<Boolean> isCallActive()
      Triggered when a call starts or stops in the conversation. The method emits the current state when first called and subsequently emits on each state change.

      If the `CallModule` isn't registered the method emits false once.

      Returns:
      Observable
    • isCallUiOpen

      io.reactivex.rxjava3.core.Observable<Boolean> isCallUiOpen()
      Triggered when the call UI for the conversation is opened or closed. The method emits the current state when first called and subsequently emits on each state change.

      you must register the `CallModule` to use this function.

      Returns:
      Observable
    • isCallUiOpenValue

      boolean isCallUiOpenValue()
      Returns:
      true if the call UI for the conversation is open. If the `CallModule` isn't registered the method always returns false.
    • startAudioCall

      void startAudioCall(@Nullable SuccessVoidCallback success, @Nullable StartAudioCallExceptionCallback failure)
      Opens the conversation in the background and starts an audio call.
      The `CallModule` must be registered to use this function.
      Parameters:
      success - : A callback returning a void type after the call has started, that is, once the call has been initiated, independently of whether it's been answered
      failure - A callback returning StartAudioCallErrorType if the request fails.
    • startVideoCall

      void startVideoCall(@Nullable SuccessVoidCallback success, @Nullable StartVideoCallExceptionCallback failure)
      Opens the conversation in the background and starts a video call.
      The `CallModule` must be registered to use this function.
      Parameters:
      success - : A callback returning a void type after the call has started, that is, once the call has been initiated, independently of whether it's been answered
      failure - A callback returning StartVideoCallErrorType if the request fails.
    • isMobileCoBrowsingActiveValue

      boolean isMobileCoBrowsingActiveValue()
      Returns:
      true if co-browsing is active for the conversation. If the `MobileCoBrowsingModule` isn't registered the method returns false.
    • isMobileCoBrowsingActive

      io.reactivex.rxjava3.core.Observable<Boolean> isMobileCoBrowsingActive()
      Triggered when the state of a mobile co-browsing session in the conversation switches between ACTIVE and INACTIVE. The method emits the current state when first called and subsequently emits on each state change.
      The `MobileCoBrowsingModule` must be registered to use this function.
      Returns:
      Observable
    • startMobileCoBrowsing

      void startMobileCoBrowsing(@Nullable SuccessVoidCallback success, @Nullable MobileCoBrowsingExceptionCallback failure)
      Opens the conversation in the background and launches mobile co-browsing.
      The `MobileCoBrowsingModule` must be registered to use this function.
      Parameters:
      success - : A callback returning a void type.
      failure - A callback returning MobileCoBrowsingErrorType if the request fails.
    • stopMobileCoBrowsing

      void stopMobileCoBrowsing(@Nullable SuccessVoidCallback success, @Nullable MobileCoBrowsingExceptionCallback failure)
      Stops mobile co-browsing in the conversation.
      The `MobileCoBrowsingModule` must be registered to use this function.
      Parameters:
      success - : A callback returning a void type.
      failure - A callback returning MobileCoBrowsingErrorType if the request fails.
    • getUnreadMessagesCount

      io.reactivex.rxjava3.core.Observable<Integer> getUnreadMessagesCount()
      Returns an Observable that emits an Integer value represent unread messages for this conversation