Quickstarts
Publisher Android
Install the Android source SDK, open the wall and verify a reward.
Install the SDK
Use Android API 24+, JDK 21, Kotlin 2.2.20 and compile SDK 35. Integrate the local core and library modules from packages/sdk-android. The source project uses Gradle 8.14 and Android Gradle Plugin 8.11.1; enable its native modules with -PwithAndroid=true. No Maven artifact has been published.
Prepare your server handoff
Create an app and placement in the publisher workspace. Enable the matching integration and obtain its public SDK key and approved HTTPS wall URL. Your authenticated backend issues a fresh, single-use JWS HS256 assertion for each open: issuer, audience KRIN, opaque subject, app, placement, issued/expiry times and nonce, with a maximum five-minute lifetime. Signing keys stay on your server. Pass the user's actual consent choices and policy version, including refusal.
Open your first wall
Call this from your rewards action after obtaining fresh handoff data. Parameters belong to your host app. Keep the SDK alive until the presentation closes and release it on teardown.
Kotlin
import android.app.Activity
import com.krin.sdk.KrinSdk
import com.krin.sdk.Handoff
import com.krin.sdk.Consent
// Call on the main thread; retain the result in your Activity.
fun openRewards(
activity: Activity,
publicAppKey: String,
wallUrl: String,
placementId: String,
freshAssertion: String,
consent: Consent,
refreshBalance: () -> Unit,
): KrinSdk {
val sdk = KrinSdk(publicAppKey, wallUrl)
sdk.onReward = { _ -> refreshBalance() }
val handoff = Handoff(placementId, freshAssertion, consent)
sdk.open(activity, handoff, fullScreen = true)
return sdk // Call sdk.dispose() in Activity.onDestroy().
}Configure the host
Add INTERNET permission and disable cleartext traffic. HTTPS wall URLs cannot contain credentials, a query or a fragment. Authorize the exact wall origin for the embedded bridge. openCustomTab(activity, handoff) is browser mode: it reports launch/error only, with no authenticated, reward or close bridge. Reconcile your balance when the app resumes; never reuse or log its one-time URL.
Verify rewards on your server
Client events update presentation only. Credit from authenticated server callbacks, deduplicate by transactionId and link reversals to originalTransactionId. A ready event means bridge readiness; authenticated confirms the session exchange. After a reward signal, refresh your server-owned balance. Close before changing users and request a fresh assertion before reopening.