Connect with Android
Connect a Kotlin app, verify a published Experience, and test an update on an Android device.
The Android SDK displays Experiences in your Kotlin app and handles events, purchases, and feature access. Once connected, you can publish new onboarding flows and paywalls without rebuilding the app. SDK setup, events, purchases, and feature access require Android API 23+ on arm64-v8a or x86_64. Experience presentation also requires a compatible Vulkan renderer; API 23 does not render Experiences. See the SDK requirements for this distinction.
Installation
Installation
Add Google and Maven Central to your app’s settings.gradle.kts:
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
}Add the released SDK to the app module’s build.gradle.kts:
dependencies {
implementation("ai.nuxie:nuxie-android:1.0.0")
}Gradle resolves the SDK and its dependencies from Maven Central. The Android SDK repository includes the example app and source-build instructions.
Initialize
Initialize
Copy your Android app’s public key from Connect your app. Use its pk_test_ key in development builds and pk_live_ key in release builds. Keep the default service environment for both; the key selects preview or live content. The Android handoff guide shows each key in its build type.
Call setup once from your Application’s onCreate:
import ai.nuxie.sdk.Nuxie
import ai.nuxie.sdk.NuxieConfiguration
val configuration = NuxieConfiguration("YOUR_ANDROID_PUBLIC_KEY")
Nuxie.setup(applicationContext, configuration)
check(Nuxie.isSetup)Handle setup exceptions before enabling interactions that use Nuxie. isSetup confirms local initialization; the connection status below confirms that the app reached Nuxie.
Run your app on a device or emulator. Connect your app shows Connected after Nuxie receives a request from the SDK.
Trigger an Experience
Trigger an Experience
Publish an Experience for this app with the event trigger integration_test. Set its re-entry rule to Every match if you want to show it repeatedly while integrating. Add this call to a button handler after setup:
import ai.nuxie.sdk.Nuxie
Nuxie.trigger("integration_test")Tapping the button sends the event. Nuxie displays the Experience when the customer matches its audience and delivery rules. For an existing Experience, replace integration_test with its published event name.
Connect your app changes to Shown after the SDK reports that the Experience appeared.
Update an Experience
Update an Experience
Edit the Experience and publish your changes. Bring the app back to the foreground to fetch the update, then send the event again with a customer who can re-enter. New Journeys use the updated version; a Journey already in progress keeps the version it started with. The app code stays the same.
See the SDK reference for identity, feature access, and App Actions. Delivery explains trigger and audience configuration.