Interface DocumentCoBrowsingModule
- All Superinterfaces:
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
.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Callback interface for document co-browsing operations -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Observable<Boolean>
Returns an observable stream of the document co-browsing activity state.boolean
Returns the current state of document co-browsingvoid
Checks whether the document co-browsing window is being dismissedvoid
Presents (or re-presents) the document co-browsing UI to the uservoid
stopDocumentCoBrowsing
(boolean stopLayer, DocumentCoBrowsingModule.DocumentCoBrowsingCallback callback) Stops the document co-browsing session if activevoid
useViewerFragmentHost
(int fragmentContainer, 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.
-
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 emitstrue
when document co-browsing becomes active andfalse
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
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
- Iftrue
, 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
).
-