Class Unblu
AgentClient
or VisitorClient
.
Additionally, it provides access to global events related to the Unblu SDK via Observables.-
Field Summary
Modifier and TypeFieldDescriptionstatic boolean
Enables the logging of capturing performance, for example, frames per second (FPS).static boolean
Enables the debug output of the Unblu SDK. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
createAgentClient
(android.app.Application application, android.app.Activity activity, UnbluClientConfiguration unbluClientConfiguration, UnbluNotificationApi notificationApi, InitializeSuccessCallback<UnbluAgentClient> success, InitializeExceptionCallback failure) Creates a new instance of theUnbluAgentClient
.static void
createAgentClient
(android.app.Application application, UnbluClientConfiguration unbluClientConfiguration, UnbluNotificationApi notificationApi, InitializeSuccessCallback<UnbluAgentClient> success, InitializeExceptionCallback failure) Creates a new instance of theUnbluAgentClient
.static void
createVisitorClient
(android.app.Application application, android.app.Activity activity, UnbluClientConfiguration unbluClientConfiguration, UnbluNotificationApi notificationApi, InitializeSuccessCallback<UnbluVisitorClient> success, InitializeExceptionCallback failure) Creates a new instance of theUnbluVisitorClient
.static void
createVisitorClient
(android.app.Application application, UnbluClientConfiguration unbluClientConfiguration, UnbluNotificationApi notificationApi, InitializeSuccessCallback<UnbluVisitorClient> success, InitializeExceptionCallback failure) Creates a new instance of theUnbluVisitorClient
.static LogLevel
Returns the log level of the Unblu SDK.static io.reactivex.rxjava3.core.Observable<UnbluAgentClient>
Fired when anUnbluAgentClient
is available.static io.reactivex.rxjava3.core.Observable<ErrorData>
onError()
Fired when an internal error occurs.static io.reactivex.rxjava3.core.Observable<UiHideRequestModel>
Fired whenever the Unblu UI needs to be hidden.static io.reactivex.rxjava3.core.Observable<UiVisibilityRequestModel>
Fired whenever the Unblu UI needs to be displayed.static io.reactivex.rxjava3.core.Observable<UnbluVisitorClient>
Fired when anUnbluVisitorClient
is available.static void
setLogLevel
(LogLevel logLevel) Sets the log level of the Unblu SDK.
-
Field Details
-
enableDebugOutput
public static boolean enableDebugOutputEnables the debug output of the Unblu SDK. The debug output contains additional information on log messages and is independent of the log level defined usingsetLogLevel(LogLevel)
. The default value isfalse
, that is, debug output is disabled. -
enableCapturingPerformanceLogging
public static boolean enableCapturingPerformanceLoggingEnables the logging of capturing performance, for example, frames per second (FPS). The default value isfalse
, that is, capturing performance logging is disabled.
-
-
Method Details
-
createVisitorClient
public static void createVisitorClient(android.app.Application application, UnbluClientConfiguration unbluClientConfiguration, UnbluNotificationApi notificationApi, @Nullable InitializeSuccessCallback<UnbluVisitorClient> success, @Nullable InitializeExceptionCallback failure) Creates a new instance of theUnbluVisitorClient
. The instance returned can then be used to access Unblu features such as chat, co-browsing, or calls. Which features are available depends on the modules you register and the collaboration server configuration.Use this method if you initialize Unblu when there's no activity, otherwise use the method
createVisitorClient(Application, Activity, UnbluClientConfiguration, UnbluNotificationApi, InitializeSuccessCallback, InitializeExceptionCallback)
.The instance should be maintained across the application as long as Unblu is in use. If the instance enters an error state it's automatically deinitialized (
UnbluClient.deinitClient(SuccessVoidCallback, DeinitializeExceptionCallback)
). When this occurs, you can initialize the instance again afterwards.- Parameters:
application
- AnApplication
instanceunbluClientConfiguration
- AnUnbluClientConfiguration
instancenotificationApi
- An implementation ofUnbluNotificationApi
success
-SuccessCallback
failure
-InitializeExceptionCallback
-
createAgentClient
public static void createAgentClient(android.app.Application application, UnbluClientConfiguration unbluClientConfiguration, UnbluNotificationApi notificationApi, @Nullable InitializeSuccessCallback<UnbluAgentClient> success, @Nullable InitializeExceptionCallback failure) Creates a new instance of theUnbluAgentClient
. The instance returned can then be used to access Unblu features such as chat, co-browsing, or calls. Which features are available depends on the modules you register and the collaboration server configuration.Use this method if you initialize Unblu when there's no activity, otherwise use the method
createAgentClient(Application, Activity, UnbluClientConfiguration, UnbluNotificationApi, InitializeSuccessCallback, InitializeExceptionCallback)
.The instance should be maintained across the application as long as Unblu is used. If the instance enters an error state, it's automatically deinitialized (
UnbluClient.deinitClient(SuccessVoidCallback, DeinitializeExceptionCallback)
). When this occurs, you can initialize the instance again afterwards.- Parameters:
application
- AnApplication
instanceunbluClientConfiguration
- AnUnbluClientConfiguration
instancenotificationApi
- An implementation ofUnbluNotificationApi
success
-SuccessCallback
failure
-InitializeExceptionCallback
-
createVisitorClient
public static void createVisitorClient(android.app.Application application, android.app.Activity activity, UnbluClientConfiguration unbluClientConfiguration, UnbluNotificationApi notificationApi, @Nullable InitializeSuccessCallback<UnbluVisitorClient> success, @Nullable InitializeExceptionCallback failure) Creates a new instance of theUnbluVisitorClient
. The instance returned can then be used to access Unblu features such as chat, co-browsing, or calls. Which features are available depends on the modules you register and the collaboration server configuration.Use this method if you already have an activity, otherwise use the method
createVisitorClient(Application, UnbluClientConfiguration, UnbluNotificationApi, InitializeSuccessCallback, InitializeExceptionCallback)
.The instance should be maintained across the application as long as Unblu is in use. If the instance enters an error state it's automatically deinitialized (
UnbluClient.deinitClient(SuccessVoidCallback, DeinitializeExceptionCallback)
). When this occurs, you can initialize the instance again afterwards.- Parameters:
application
- AnApplication
instanceactivity
- The currentActivity
unbluClientConfiguration
- AnUnbluClientConfiguration
instancenotificationApi
- An implementation ofUnbluNotificationApi
success
-SuccessCallback
failure
-InitializeExceptionCallback
-
createAgentClient
public static void createAgentClient(android.app.Application application, android.app.Activity activity, UnbluClientConfiguration unbluClientConfiguration, UnbluNotificationApi notificationApi, @Nullable InitializeSuccessCallback<UnbluAgentClient> success, @Nullable InitializeExceptionCallback failure) Creates a new instance of theUnbluAgentClient
. The instance returned can then be used to access Unblu features such as chat, co-browsing, or calls. Which features are available depends on the modules you register and the collaboration server configuration.Use this method if you already have an activity, otherwise use the method
createAgentClient(Application, UnbluClientConfiguration, UnbluNotificationApi, InitializeSuccessCallback, InitializeExceptionCallback)
.The instance should be maintained across the application as long as Unblu is in use. If the instance enters an error state it's automatically deinitialized (
UnbluClient.deinitClient(SuccessVoidCallback, DeinitializeExceptionCallback)
). When this occurs, you can initialize the instance again afterwards.- Parameters:
application
- AnApplication
instanceactivity
- the currentActivity
unbluClientConfiguration
- AnUnbluClientConfiguration
instancenotificationApi
- An implementation ofUnbluNotificationApi
success
-SuccessCallback
failure
-InitializeExceptionCallback
-
setLogLevel
Sets the log level of the Unblu SDK. Any messages with a lower log level than the one specified here go unlogged.
The default value isLogLevel.VERBOSE
. In release builds, the VERBOSE and DEBUG logs are stripped out via proguard.- Parameters:
logLevel
- The log level to set- See Also:
-
getLogLevel
Returns the log level of the Unblu SDK. Any messages with a lower log level than the one specified here go unlogged.- Returns:
- The log level of the Unblu SDK.
- See Also:
-
onUiVisibilityRequest
public static io.reactivex.rxjava3.core.Observable<UiVisibilityRequestModel> onUiVisibilityRequest()Fired whenever the Unblu UI needs to be displayed. This happens when a push notification for a call comes in, for example, or if the user clicks a notification and a conversation should be displayed. You should observe this from the beginning of the application running so you receive visibility requests related to notifications.- Returns:
- An
Observable
that emitsUiVisibilityRequestModel
data
-
onUiHideRequest
Fired whenever the Unblu UI needs to be hidden. This happens when mobile co-browsing is started, for example.- Returns:
- An
Observable
that emitsUiHideRequestModel
data
-
onError
Fired when an internal error occurs. Normally this is the case ifUnbluClient
couldn't load anything from the Unblu server.
The error message is intended for internal use only. It isn't localized and shouldn't be displayed to users.- Returns:
- An
Observable
that emitsErrorData
-
onAgentInitialized
Fired when anUnbluAgentClient
is available. The client instance is provided in an initialized state, ready to use.- Returns:
- An
Observable
that emits each time anUnbluAgentClient
is initialized.
-
onVisitorInitialized
Fired when anUnbluVisitorClient
is available. The client instance is provided in an initialized state, ready to use.- Returns:
- An
Observable
that emits each time anUnbluVisitorClient
is initialized.
-