Skip to content

API Reference

This page summarizes the public entry points visible in the shared Kotlin code.

Main responsibilities:

  • initialize SDK runtime
  • load popup definitions
  • attach a platform context
  • evaluate triggers and queue popups
  • render popup and survey experiences
  • emit popup lifecycle events
  • init(options: InitOptions)
  • initialize(options: InitOptions)
  • autoLaunch()
  • attachContext(context: PlatformContext)
  • setPath(path: String?)
  • onScroll(percentage: Int)
  • onExit()
  • triggerEvent(eventName: String)
  • triggerClick(targetId: String)
  • show(options: ShowOptions, context: PlatformContext)
  • showByPopupId(popupId: String, context: PlatformContext)
  • triggerSurvey(surveyId: String, context: PlatformContext, popupId: String? = null)
  • on(event: Event, listener: (EventData) -> Unit)
  • off(event: Event, listener: (EventData) -> Unit)
  • environment: Environment — read-only, reflects the backend the SDK is pointed at after init() (defaults to Environment.Production). Useful for asserting at runtime which backend a given publicKey is hitting.

The Deepdots object provides utility helpers:

  • create()
  • createInitialized(options)
  • now()
  • parseHtml(html)
  • dismiss(context)
  • getSurveyHtml(surveyId, productId)
  • createInitializedSimple(...)

The repository also provides scroll binding helpers on Android:

  • bindRecyclerView(recyclerView: RecyclerView)
  • bindScrollView(scrollView: ScrollView)

These help translate host scrolling into onScroll(...) updates for trigger evaluation.