Developer & AI Integration Docs

Adxiety Client SDK Integration Guide

Zero-permission, 100% offline attention-proof verification for Android. Integrate in under 5 lines of Kotlin or via a single AI assistant prompt.

Network Permission0 (None)
Compiled DEX< 30 KB
Pass Check Latency< 1.2 ms
Target AndroidAPI 26 – 36

1-Turn AI Coding Assistant Prompt

Optimized for Antigravity, Cursor, GitHub Copilot, and Claude. Paste directly into your chat.

# Adxiety Client SDK Integration Specification
Integrate the Adxiety Client SDK into this Android project to enable 100% offline, privacy-preserving ad-lease monetization.

### Invariants You Must Never Violate:
1. ZERO INTERNET PERMISSION: Do not add <uses-permission android:name="android.permission.INTERNET" />. The host app must remain 100% offline.
2. ZERO AD SDK DEPENDENCIES: Never add Google Mobile Ads, AdMob, or ad tracking dependencies. All advertising is quarantined in the Adxiety companion app.

### Step 1: Add Dependency in app/build.gradle.kts
dependencies {
    implementation(files("libs/adxiety-client-1.0.0.aar"))
    // Ensure coroutines is present:
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0")
}

### Step 2: Add Package Query in AndroidManifest.xml
Under <manifest>, declare package visibility for Android 11+ (API 30+):
<queries>
    <package android:name="com.adxiety.app" />
</queries>

### Step 3: Implement Lease Check & Renewal in Kotlin
import com.adxiety.client.AdxietyClient

// 1. Instant Synchronous Check (< 1.2ms local cached execution):
if (AdxietyClient.isLeaseActive(context)) {
    // Feature unlocked: execute premium/utility action
} else {
    // Show unlock or paywall prompt
}

// 2. Launch Renewal Flow:
unlockButton.setOnClickListener {
    AdxietyClient.launchRenewal(context)
}

### Step 4: Reactive Compose Observation (Optional)
val leaseState by AdxietyClient.observeLease(context).collectAsState(initial = AdxietyClient.getLeaseState(context))
if (leaseState.isActive) {
    Text("Active: ${leaseState.formattedRemaining}")
} else {
    Button(onClick = { AdxietyClient.launchRenewal(context) }) {
        Text("Unlock for Free via Adxiety")
    }
}

3-Step Quickstart for Android Developers

No API keys in your APK, no network initialization, no tracking manifests.

1

Add the SDK Dependency

Add adxiety-client-1.0.0.aar to your app/libs/ folder and update app/build.gradle.kts:

dependencies {
    // Adxiety Client SDK (Zero permissions, < 30 KB DEX footprint)
    implementation(files("libs/adxiety-client-1.0.0.aar"))
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0")
}
2

Declare Package Visibility

In your AndroidManifest.xml, declare a query for the Adxiety companion app so Android 11+ allows offline ContentProvider IPC:

<!-- Required on Android 11+ (API 30+) for offline ContentProvider IPC -->
<queries>
    <package android:name="com.adxiety.app" />
</queries>
3

Verify Passes and Launch Renewals

Check whether the user holds an active pass in <1.2ms. When expired, invoke launchRenewal(context):

import com.adxiety.client.AdxietyClient

// 1. Instant Synchronous Check (< 1.2ms local verification)
val isUnlocked = AdxietyClient.isLeaseActive(context)
if (isUnlocked) {
    // Run utility feature without restrictions
    startAutomatedService()
} else {
    // Prompt user to renew or grant pass
    showPaywallSheet()
}

// 2. Launch Renewal in Quarantined Companion App
// If Adxiety is installed, deep-links directly to your app's renewal card.
// If not installed, seamlessly falls back to Google Play Store.
AdxietyClient.launchRenewal(context)

Jetpack Compose Reactive Observation

Use AdxietyClient.observeLease(context) to automatically update your Compose UI when a pass is extended:

import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.ui.platform.LocalContext
import com.adxiety.client.AdxietyClient

@Composable
fun FeaturePassCard() {
    val context = LocalContext.current
    val leaseState by AdxietyClient.observeLease(context)
        .collectAsState(initial = AdxietyClient.getLeaseState(context))

    if (leaseState.isActive) {
        Card {
            Text("Feature Unlocked")
            Text(leaseState.formattedRemaining) // e.g. "6 days remaining"
        }
    } else {
        Button(onClick = { AdxietyClient.launchRenewal(context) }) {
            Text("Unlock for Free with [ad]xiety")
        }
    }
}

Architecture & Core Invariants

The Zero-Permission Invariant

The Adxiety Client SDK will never declare or require android.permission.INTERNET. Host applications can remain strictly offline, air-gapped utility tools.

Quarantined Ad Mediation

Your host application never executes ad code, banner views, or mediation listeners. AdMob is completely isolated in the Adxiety companion app.

The Stacking Energy Tank

Users do not need to wait until a pass expires to renew. Early views additively stack up to your configured ceiling (e.g. 30 days) without resetting existing balances.

Dynamic Edge Cloud Config

Change pass duration (e.g. 7 days vs 14 days) or update your AdMob rewarded unit IDs via the developer dashboard. The companion app fetches updates automatically.

Complete Kotlin API Reference

MethodReturn TypeDescription
isLeaseActive(context)BooleanSynchronous <1.2ms check whether the host app holds an unexpired pass.
getLeaseState(context)AdxietyLeaseStateReturns complete snapshot including remaining seconds, days, hours, and formatted label.
observeLease(context)Flow<AdxietyLeaseState>Reactive Kotlin Flow that emits whenever a pass is granted, extended, or expired.
claimPendingCredits(context)IntFor token/action-based models (e.g. AI prompts, PDF exports). Atomically claims newly minted vouchers.
isAdxietyInstalled(context)BooleanChecks if the Adxiety companion app is currently installed on the user device.
launchRenewal(context)UnitDeep-links user to Adxiety companion app renewal card, falling back to Google Play Store if not installed.

Google Play Data Safety & Audit Compliance

When submitting your app to Google Play Console, you can truthfully answer "No" to all user data collection questions regarding the Adxiety SDK:

Data Collection:No data collected
Data Shared:No data shared
Ad ID (AAID):Not requested

Need a ready-made privacy policy snippet for your Play Console store listing?

Open Privacy Policy Generator