CobrowseIO class abstract

Inheritance
  • Object
  • PlatformInterface
  • CobrowseIO
Implementers

Constructors

CobrowseIO()

Properties

handleRemoteControlRequest Stream<Session>
Listen to this event emitter to override the default remote control acceptance prompt. When you have gained confirmation from the user, you should call Session.setRemoteControl and pass either RemoteControlState.on or RemoteControlState.rejected to approve or reject the remote control request.
no setter
handleSessionRequest Stream<Session>
Listen to this event emitter to override the default session acceptance prompt. The session passed to this method will be in the SessionState.authorizing state, when you have gained confirmation from the user, you should call either Session.activate or Session.end to approve or reject the session.
no setter
hashCode int
The hash code for this object.
no setterinherited
hideSessionControls Stream<Session>
Listen to this event emitter to remove the controls you showed in CobrowseIO.showSessionControls.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sessionDidEnd Stream<Session>
Called when a session will end.
no setter
sessionDidLoad Stream<Session>
Called when a session is first loaded from the server, either via 6 digit code or connection from an agent.
no setter
sessionDidUpdate Stream<Session>
Called when a new session is started, or an existing session changes state.
no setter
showSessionControls Stream<Session>
Listen to this event emitter to override the default session indicator. This method may be called several times as the session progresses through its lifecycle, so you may need to adjust your UI accordingly. See the available sesssion methods to inspect session state. Note you should also listen to CobrowseIO.hideSessionControls if you are implementing this feature.
no setter

Methods

api() Future<String>
Returns the previously set API endpoint.
capabilities() Future<List<String>>
Returns the previously set capabilities, or the default values if no custom capabilities have been set.
createSession() Future<Session>
Creates a new screenshare session. Sessions will start in a 'pending' state. To activate a session an agent must have joined and all required consent given by the user. Pending sessions contain a six digit code that can be displayed for the user to give to a support agent.
currentSession() Future<Session?>
Gets the current screenshare session. This may be a session waiting to start, the currently active session, or may be null if no session has been created.
customData() Future<Map<String, dynamic>>
Returns the previously set custom data.
deviceId() Future<String>
Returns the unique device ID generated by the Cobrowse SDK.
getSession(String idOrCode) Future<Session>
Fetches a session by its ID or by a 6 digit code. When loaded the callback will be invoked with the session object, or an error if the session could not be fetched.
isCobrowseNotification(Map<String, String>? data) Future<bool>
Tests whether a push notification was generated by Cobrowse. Returns true if it looks like a Cobrowse notification.
license() Future<String>
Returns the previously set Cobrowse license.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onPushNotification(Map<String, String> data) Future<void>
Call this when your Firebase handler receives a push notification. Non-cobrowse push notifications will be ignored.
registration() Future<bool>
Returns a value indicating whether the device should automatically register on the dashboard.
setApi(String api) Future<void>
Configure the SDK to use an enterprise deployment API.
setCapabilities(List<String> capabilities) Future<void>
Sets the available capabilities for a session. Different annotation tools and events will be available during a session depending on the capabilities you set here. By default all capabilities supported by the device are enabled.
setCustomData(Map<String, dynamic> customData) Future<void>
Sets metadata attached to this device that will be displayed and filterable in the web dashboard. This allows you to find and identify your users devices quickly. We recommend adding information such as your logged in users email addresses or user IDs here.
setDeviceToken(String token) Future<void>
Sets the device native channel push notification token, i.e. Firebase token. This is only required if you are using our Firebase push support.
setLicense(String license) Future<void>
Sets the Cobrowse license (available via the web dashboard).
setRegistration(bool registration) Future<void>
By default, when the SDK starts it will register the device to your account and share its connectivity state. This provides the dashboard with a list of devices which are online and ready to connect.
start() Future<void>
Call start() when you have configured Cobrowse and would like to start accepting incoming session requests. Calling start will register the device into your cobrowse dashboard and open a socket to accept incoming connection requests from your support agents.
stop() Future<void>
Stops Cobrowse, de-registering the device from the server and closing any open connections. After this method has been called you can no longer start sessions either via the dashboard, or via a 6 digit code, until Cobrowse has been started again.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance CobrowseIO
The default instance of CobrowseIO to use.
getter/setter pair