SDK Structure

The OpenWeb Android SDK is organized as a set of layered interfaces accessible through a single entry point: OpenWeb.manager.

The primary interface is OWManager.

OpenWeb.manager is the gateway for all SDK operations. It is a singleton instance that exposes the subsystems below.

interface OWManager {
    var spotId: OWSpotId?
    val ui: OWUI
    val authentication: OWAuthentication
    val helpers: OWHelpers
    val analytics: OWAnalytics
}

Through OWUI, you access the SDK's visual layer. As of SDK version 3.0.0, OWUIComponents is the primary UI API. OWUIFlows and OWUIViews are deprecated.

interface OWUI {
    val components: OWUIComponents
    val customizations: OWCustomizations
    val authentication: OWUIAuthentication
    val flows: OWUIFlows      // Deprecated — use components
    val views: OWUIViews      // Deprecated — use components
}

Subsequent sections of the documentation cover each layer in detail.


Setting Up SpotId

Your spotId is provided by your PSM. Set it on the manager before calling any other SDK API.

OpenWeb.manager.spotId = "YOUR_SPOT_ID"

Core Components

OWManager

OpenWeb.manager is the entry point and core configuration manager for the SDK. It manages SDK initialization via spotId and provides access to all subsystems.


OWUI

OWUI is accessed via OpenWeb.manager.ui and provides the SDK's visual layer. OWUIComponents is the primary API for embedding conversation experiences as of SDK version 3.0.0:

val components: OWUIComponents = OpenWeb.manager.ui.components

OWUIComponents exposes three methods for embedding conversation experiences:

  • getPreConversation() — Returns a Fragment displaying the pre-conversation summary widget.
  • getConversation() — Returns a Fragment containing the full conversation.
  • openConversation() — Launches the conversation as a full-screen SDK-managed activity.

Note: OWUIFlows and OWUIViews remain available but are deprecated. See the Migration Guide for replacement steps.


OWAnalytics

OWAnalytics tracks user interactions and events. It allows publishers to:

  • Monitor custom BI events using analyticAdditionalInfo.
  • Set up an AnalyticsEventDelegate to intercept and handle analytics events.
OpenWeb.manager.analytics.setAnalyticsEventDelegate(myDelegate)

OWHelpers

OWHelpers provides utilities for configuration and debugging:

  • Logging: Customize log levels and outputs.
  • Language and locale management.
  • Orientation enforcement.
OpenWeb.manager.helpers.loggerConfiguration.level = OWLogLevel.DEBUG

OWAuthentication

OWAuthentication handles user authentication and Single Sign-On (SSO) flows:

  • Renewing SSO tokens.
  • Checking user login status.
  • Triggering logout.
OpenWeb.manager.authentication.startSSO(callback = object : SpotCallback<StartSSOResponse> {
    override fun onSuccess(response: StartSSOResponse) {
        // Handle success
    }
    override fun onFailure(exception: SpotException) {
        // Handle failure
    }
})

Next Steps

See the Migration Guide if you are upgrading from SDK 2.x.