Integrate Nuxie with Android
Add the Android SDK and show the Experience you published.
Use this guide with the setup prompt copied from Connect your app. It contains the keys for your builds and, after publishing, the Experience name and exact trigger event. You’ll install the SDK, call that trigger from the relevant app action, and see the published Experience on a device or emulator.
Requires Android API 23 or later and JDK 17. Experience presentation requires a compatible Vulkan renderer on arm64-v8a or x86_64. API 23 supports setup, events, purchases, and feature access, but does not render Experiences; use a newer Android version with a compatible driver for this presentation test. If you haven’t published an Experience yet, follow Integrate your app first.
Install the SDK
1. Install the SDK
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.
Put each key in the matching build type
2. Put each key in the matching build type
Give each build type its own key, for example as a BuildConfig field:
android {
buildFeatures {
buildConfig = true
}
buildTypes {
debug {
buildConfigField("String", "NUXIE_API_KEY", "\"<API_KEY_DEBUG_BUILDS>\"")
}
release {
buildConfigField("String", "NUXIE_API_KEY", "\"<API_KEY_RELEASE_BUILDS>\"")
}
}
}If your app already has its own configuration system, add the key there instead. The Debug builds key starts with pk_test_ and receives preview versions. The Release builds key starts with pk_live_ and receives production versions. Use these publishable app keys, never workspace API keys.
Purchases made by Google Play license testers, including from an internal testing track, are test purchases, which Nuxie accepts only with the pk_test_ key. Build the uploads your testers buy in with the test key, for example from a separate build type, and keep the live key for the build you release on Google Play.
Configure Nuxie at app launch
3. Configure Nuxie at app launch
Call setup once in your Application class:
import ai.nuxie.sdk.Nuxie
import ai.nuxie.sdk.NuxieConfiguration
import android.app.Application
class CadenceApplication : Application() {
override fun onCreate() {
super.onCreate()
val configuration = NuxieConfiguration(BuildConfig.NUXIE_API_KEY)
Nuxie.setup(applicationContext, configuration)
}
}Register the class with android:name on the <application> element of AndroidManifest.xml. Setup throws when the configuration is invalid; handle that with your app’s launch error handling.
Leave configuration.environment at its default for every build. The key alone selects test or live content, and purchases are matched to customers by that key.
Configure purchases
Google Play Billing needs no extra configuration: Nuxie completes the purchases its Experiences start. If your app already uses a purchase provider, set purchaseHandlingMode = PurchaseHandlingMode.APP_MANAGED and a purchaseDelegate on the configuration before setup. See Purchases and the RevenueCat and Superwall adapters linked there.
Wire the published trigger
4. Wire the published trigger
Nuxie.trigger("<TRIGGER_EVENT>")Replace the placeholder with the exact event in the handoff. Call it from the intended user action after setup, such as an upgrade button’s click handler.
Show onboarding at first launch
To show an onboarding and paywall only to people who don’t have access yet, check the Feature at launch and send the trigger only when it isn’t allowed:
lifecycleScope.launch {
try {
val access = Nuxie.hasFeature("<FEATURE_KEY>")
if (!access.allowed) Nuxie.trigger("<TRIGGER_EVENT>")
} catch (error: Exception) {
// Access is unknown, for example offline: try again at the next launch.
}
}Run it once per launch, after setup and after identify() when your app restores a signed-in account, so Nuxie checks the right customer. Set the Experience’s Re-entry to One time so it appears only the first time. Someone who already has access, such as after buying on another device, never sees it.
Verify on a device or emulator
5. Verify on a device or emulator
Run the app and open Connect your app in Nuxie. The status changes to Connected when the SDK connects. Perform the app action that sends the trigger; the published screen should appear and the status should show Shown. Complete or dismiss the Experience to finish the run.
On an emulator, use an arm64-v8a or x86_64 system image with Vulkan. To try the paywall without Google Play, set testStoreEnabled = BuildConfig.DEBUG on the configuration: Nuxie’s Test Store completes the purchase without a charge and unlocks the Feature. To prove a real Google Play purchase, use a license tester; see Testing.
If the screen does not appear, check the app key, event name, audience, and re-entry rules.
Confirm the integration
If you’re using a coding agent, ask it to summarize where it added configuration and the trigger, which purchase integration it used, and what it verified on the device. This makes it easy to review the changes before releasing your app.
Continue with the Android SDK reference for identity, feature access, and App Actions, or Google Play for purchase verification.