Overview
KLP Android SDK delivers loyalty and gamification inside your app through a secure WebView. Session management, real-time notifications (SSE), event logging, and in-app deeplink routing are provided through a single interface.
What you get
- Secure WebView-based loyalty experience
- Automatic session persistence and SSE lifecycle
- Built-in notification UI (overridable)
- Event logging to Kaizen Loyalty
- Deeplink handoff from WebView to your native screens
- JavaScript bridge for web content inside the WebView
Requirements
| Item | Value |
|---|---|
| Minimum Android API | 24 (Android 7.0) |
| Language | Kotlin or Java (examples use Kotlin) |
| JDK | 17 |
The SDK is distributed through a private Maven repository. Obtain coordinates and version from the Kaizen team or your distribution documentation:
com.klp.sdk:klp-android-sdk:<version>
Quick start
Initialize in Application
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
val config = KLPConfig.Builder()
.setDebugMode(BuildConfig.DEBUG)
.setDebugScreenEnabled(false)
.build()
KLP.initialize(this, config)
}
}After login
KLP.getInstance().setUser(
userId = "organization_consumer_integration_id",
accessToken = "access_token",
refreshToken = null,
nameInitials = "GA" // optional: avatar initials in the WebView
)
KLP.getInstance().launch(activity)Call setUser only when the user signs in or switches accounts. On app restart, the SDK restores the saved session automatically.
Logout
KLP.getInstance().logout()Updated about 2 months ago
Did this page help you?
