Interface DocumentCoBrowsingModule

All Superinterfaces:
UnbluModule

public interface DocumentCoBrowsingModule extends UnbluModule
The API for the document co-browsing module. To obtain an instance of the API, call DocumentCoBrowsingModuleProvider.create().

The API is only usable if the corresponding module was registered in the configuration of the UnbluClient. Note: If the connected server does not support document co-browsing, operations that return or emit booleans will indicate failure or inactivity with false.

  • Method Details

    • useViewerFragmentHost

      void useViewerFragmentHost(@IdRes int fragmentContainer, @NonNull androidx.appcompat.app.AppCompatActivity activity)
      Tell the module to host the document viewer within an activity, replacing or adding a fragment in the given fragmentContainer. Optional. If not used, the SDK starts its own activity to host the document viewer.
    • isDocumentCoBrowsingActiveValue

      boolean isDocumentCoBrowsingActiveValue()
      Returns the current state of document co-browsing
      Returns:
      true if document co-browsing is currently active, false otherwise.
    • isDocumentCoBrowsingActive

      io.reactivex.rxjava3.core.Observable<Boolean> isDocumentCoBrowsingActive()
      Returns an observable stream of the document co-browsing activity state. Emits the current state and any subsequent changes.
      Returns:
      An Observable that emits true when document co-browsing becomes active and false when it becomes inactive.
    • isDocumentCoBrowsingBeingDismissed

      void isDocumentCoBrowsingBeingDismissed(@NonNull DocumentCoBrowsingModule.DocumentCoBrowsingCallback callback)
      Checks whether the document co-browsing window is being dismissed
      Parameters:
      callback - A callback that's called with a Boolean indicating whether the co-browsing UI is being dismissed (true) or not (false).
    • showDocumentCoBrowsing

      void showDocumentCoBrowsing(@NonNull DocumentCoBrowsingModule.DocumentCoBrowsingCallback callback)
      Presents (or re-presents) the document co-browsing UI to the user
      Parameters:
      callback - A callback that's called with a Boolean indicating whether the co-browsing UI was shown successfully (true) or if an error/precondition prevented it (false).
    • stopDocumentCoBrowsing

      void stopDocumentCoBrowsing(boolean stopLayer, @NonNull DocumentCoBrowsingModule.DocumentCoBrowsingCallback callback)
      Stops the document co-browsing session if active
      Parameters:
      stopLayer - If true, stops any associated layer used during co-browsing.
      callback - A callback that's called with a Boolean indicating whether stopping was successful (true) or failed due to an error or unmet precondition (false).