Interface MobileCoBrowsingModule
- All Superinterfaces:
UnbluModule
MobileCoBrowsingModuleProvider.create()
.
The API is only usable if the corresponding module was registered in the configuration of the UnbluClient.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPrivateView
(int id) Adds the view with the given ID to the Set of private views.void
Removes the private area with the given ID.void
removePrivateView
(int id) Removes the view with the given ID from the Set of private views.void
Sets anIndicatorButtonClickInterceptor
on the module.void
setCoBrowsingIndicatorIcon
(UnbluImageResourceWrapper indicatorIcon) Sets the icon used as a floating indicator within the application's user interface.setPrivateArea
(String id, int x, int y, int width, int height) Adds or updates a private area with the given size and position.
-
Method Details
-
addPrivateView
void addPrivateView(int id) Adds the view with the given ID to the Set of private views.Private views are only visible on the mobile device and aren't transmitted during co-browsing. The views are covered before they're transmitted so they aren't visible on the agent side.
Note:
Each private view requires extra performance while capturing the UI so try to limit the number of private views you add. The best practice is to dynamically make views private when they're displayed in the app UI and remove them from the private view list when they aren't visible anymore.
Multiple calls with the same ID don't have any effect.
- Parameters:
id
- ID of the view that should be made private.
-
removePrivateView
void removePrivateView(int id) Removes the view with the given ID from the Set of private views.Multiple calls with the same ID don't have any effect.
- Parameters:
id
- ID of the view to remove- See Also:
-
setPrivateArea
Adds or updates a private area with the given size and position.Private areas are only visible on the mobile device and aren't transmitted during co-browsing. The areas are covered before they're transmitted so they aren't visible on the agent side.
To update a private area, either call this function again with the same ID or modify the returned
PrivateArea
.
Changes to the returned private area or using this function are applied directly, even if co-browsing is already active.Note:
The number of private areas impacts performance during co-browsing. You should therefore try to keep the number of private areas to a minimum
- Parameters:
id
- Unique ID of the private area which can be used to update the values or to remove the private areax
- x position on the screen for the private areay
- y position on the screen for the private areawidth
- Width of the private areaheight
- Height of the private area- Returns:
- A
PrivateArea
which can be updated instead of using this API function - See Also:
-
removePrivateArea
Removes the private area with the given ID.Multiple calls with the ID don't have any effect.
- Parameters:
id
- of the area to remove from the private areas- See Also:
-
setCobrowsingIndicatorButtonClickInterceptor
void setCobrowsingIndicatorButtonClickInterceptor(@Nullable IndicatorButtonClickInterceptor interceptor) Sets anIndicatorButtonClickInterceptor
on the module.The interceptor is called when the user clicks on a cobrowsing indicator button.
- Parameters:
interceptor
- The interceptor to use. If null is passed in, the SDK will always handle the button clicks.
-
setCoBrowsingIndicatorIcon
Sets the icon used as a floating indicator within the application's user interface. This method allows customization of the floating indicator's appearance by specifying an icon wrapped in anUnbluImageResourceWrapper
, which can encapsulate various types of image resources, including drawables, ImageVector objects, and URLs.- Parameters:
indicatorIcon
- An instance ofUnbluImageResourceWrapper
representing the new icon to be used for the floating indicator.
-