API Reference
API Reference
Section titled “API Reference”This page summarizes the public entry points visible in the shared Kotlin code.
Primary SDK class
Section titled “Primary SDK class”DeepdotsPopups
Section titled “DeepdotsPopups”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
Key methods
Section titled “Key methods”Initialization
Section titled “Initialization”init(options: InitOptions)initialize(options: InitOptions)autoLaunch()attachContext(context: PlatformContext)
Navigation and triggers
Section titled “Navigation and triggers”setPath(path: String?)onScroll(percentage: Int)onExit()triggerEvent(eventName: String)triggerClick(targetId: String)
Display
Section titled “Display”show(options: ShowOptions, context: PlatformContext)showByPopupId(popupId: String, context: PlatformContext)triggerSurvey(surveyId: String, context: PlatformContext, popupId: String? = null)
Events
Section titled “Events”on(event: Event, listener: (EventData) -> Unit)off(event: Event, listener: (EventData) -> Unit)
Diagnostics
Section titled “Diagnostics”environment: Environment— read-only, reflects the backend the SDK is pointed at afterinit()(defaults toEnvironment.Production). Useful for asserting at runtime which backend a givenpublicKeyis hitting.
Convenience helpers
Section titled “Convenience helpers”Deepdots
Section titled “Deepdots”The Deepdots object provides utility helpers:
create()createInitialized(options)now()parseHtml(html)dismiss(context)getSurveyHtml(surveyId, productId)createInitializedSimple(...)
Platform-specific helpers
Section titled “Platform-specific helpers”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.