Interface MobileCoBrowsingModule

  • All Superinterfaces:
    UnbluModule

    public interface MobileCoBrowsingModule
    extends UnbluModule
    The API for the mobile co-browsing module. To obtain an instance of the API, call MobileCoBrowsingModuleProvider.create().

    The API is only usable if the corresponding module was registered in the configuration of the UnbluClient.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addPrivateView​(int id)
      Adds the view with the given ID to the Set of private views.
      void removePrivateArea​(java.lang.String id)
      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.
      PrivateArea setPrivateArea​(java.lang.String id, int x, int y, int width, int height)
      Adds or updates a private area with the given size and position.
    • Method Detail

      • 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:
        addPrivateView(int)
      • setPrivateArea

        PrivateArea setPrivateArea​(@NonNull
                                   java.lang.String id,
                                   int x,
                                   int y,
                                   int width,
                                   int height)
        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 area
        x - x position on the screen for the private area
        y - y position on the screen for the private area
        width - Width of the private area
        height - Height of the private area
        Returns:
        A PrivateArea which can be updated instead of using this API function
        See Also:
        removePrivateArea(String)
      • removePrivateArea

        void removePrivateArea​(java.lang.String id)
        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:
        setPrivateArea(String, int, int, int, int)