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.
1-Turn AI Coding Assistant Prompt
Optimized for Antigravity, Cursor, GitHub Copilot, and Claude. Paste directly into your chat.
# [ad]xiety Client SDK Integration Specification
Integrate the [ad]xiety Client SDK into this Android project to enable 100% offline, zero-permission attention passes alongside your commercial in-app purchases.
### Invariants You Must Never Violate:
1. ZERO NETWORK PERMISSION IN SDK: Do not add ad network permissions or ad tracking libraries. The [ad]xiety Client SDK requires zero network permissions and operates 100% offline via local IPC.
2. ZERO AD SDK DEPENDENCIES: Never add Google Mobile Ads, AdMob, AppLovin, or mediation dependencies to the host app. All advertising is quarantined strictly in the [ad]xiety companion app.
3. 3-TIER ACCESS CHAIN: Commercial subscriptions and one-time purchases (OTP) take precedence. If no commercial license is held, check the [ad]xiety attention pass.
### Step 1: Add Dependency in app/build.gradle.kts
dependencies {
// [ad]xiety 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")
}
### Step 2: Zero-Config Manifest & Queries
The SDK AAR automatically merges package queries (<queries>) and the reciprocal return activity (com.adxiety.client.AdxietyReturnActivity). Zero manual manifest edits are required.
### Step 3: Implement 3-Tier Access Gatekeeper in Kotlin
import com.adxiety.client.AdxietyClient
import com.adxiety.client.model.AdxietyLeaseState
object EntitlementManager {
fun isAccessGranted(context: Context): Boolean {
// Tier 1: Paid In-App Subscription (Highest Priority)
if (hasActiveSubscription(context)) return true
// Tier 2: Paid One-Time Purchase / Pro Key
if (hasProLicenseKey(context)) return true
// Tier 3: Free Attention Pass via [ad]xiety (< 1.2ms offline query)
return try {
AdxietyClient.isLeaseActive(context)
} catch (e: Exception) {
false
}
}
// Background or service threads:
suspend fun getLeaseStateAsync(context: Context): AdxietyLeaseState {
return AdxietyClient.getLeaseStateAsync(context)
}
}
### Step 4: Launch Renewal Flow
unlockButton.setOnClickListener {
// Deep-links user directly to [ad]xiety app renewal card, falling back to Google Play if not installed.
AdxietyClient.launchRenewal(context)
}
### Step 5: 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 [ad]xiety")
}
}
Using an Agentic AI Assistant? (Antigravity, Cursor, Claude Code, Copilot)
Our platform provides a dedicated assistant skill at .agents/skills/sdk_integrator/SKILL.md. It automates environment inspection (minSdk, permissions, billing stacks), selects from 5 modular monetization patterns (Pure Attention, Parallel Paywalls, Churn Cushions, Action Credits, Ad-Free Passes), scaffolds drop-in Compose UI cards, and runs automated verification commands in a single autonomous turn.
3-Step Quickstart for Android Developers
No API keys in your APK, no network initialization, no tracking manifests.
Add the SDK Dependency
Add adxiety-client-1.0.0.aar to your app/libs/ folder and update app/build.gradle.kts:
dependencies {
// [ad]xiety 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")
}Zero-Config Manifest Merging
Gradle automatically merges all necessary IPC package queries and the reciprocal return action (com.adxiety.action.HOST_APP) directly from the SDK AAR. Zero manual manifest edits are required. (Shown below only if your build pipeline disables Gradle manifest merging):
<!-- Automatically merged from SDK AAR. Only required if your pipeline disables Manifest Merging: -->
<queries>
<package android:name="com.adxiety.app" />
<package android:name="com.adxiety.app.debug" />
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="adxiety" android:host="renew" />
</intent>
</queries>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 for UI / render threads)
val isUnlocked = AdxietyClient.isLeaseActive(context)
if (isUnlocked) {
startAutomatedService()
} else {
showPaywallSheet()
}
// 2. Background Asynchronous Check (IO dispatcher for background services & cold-start)
suspend fun checkLeaseOnBackgroundThread() {
val leaseState = AdxietyClient.getLeaseStateAsync(context)
if (leaseState.isActive) {
val remainingDays = leaseState.remainingDays
// Forward-compatible dynamic metadata envelope:
val notice = leaseState.extras.getString("server_notice")
}
}
// 3. Launch Renewal in Quarantined [ad]xiety App
// Reciprocal return: [ad]xiety seamlessly returns the user back to your app upon completion.
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 Adxiety Client SDK will never declare or require android.permission.INTERNET. Whether your application is an offline utility or cloud-connected service, pass verification executes 100% locally via sub-millisecond IPC with zero ad trackers added to your APK.
Your app never executes ad code, banner views, or mediation listeners. All advertising is quarantined strictly inside the [ad]xiety companion app.
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). For participating apps, optional offline continuity reserves keep users from being shut out while off-grid.
Change ad pass duration (e.g. 7 days vs 14 days) or update your stacking ceilings and payout details via the developer dashboard. The [ad]xiety app fetches updates automatically.
User Experience & Trust Guide
Curious what the renewal flow looks like for your end users? Inspect the consumer experience, privacy guarantees, and haptic chimes at adxiety.com/for-users or explore the companion hub on Google Play. You can link this explainer directly in your app's FAQ or paywall.
Complete Kotlin API Reference
| Method | Return Type | Description |
|---|---|---|
| isLeaseActive(context) | Boolean | Synchronous <1.2ms check whether the host app holds an unexpired pass. |
| getLeaseState(context) | AdxietyLeaseState | Returns complete snapshot including remaining seconds, days, hours, and formatted label. |
| getLeaseStateAsync(context) | suspend AdxietyLeaseState | Asynchronous query dispatched on Dispatchers.IO for background services, workers, and cold-start threads. |
| observeLease(context) | Flow<AdxietyLeaseState> | Reactive Kotlin Flow that emits whenever a pass is granted, extended, or expired. |
| leaseState.extras | Bundle | Forward-compatible dynamic metadata envelope containing server notices, harvested columns, and custom payloads. |
| claimPendingCredits(context) | Int | For token/action-based models (e.g. AI prompts, PDF exports). Atomically claims newly minted vouchers. |
| isAdxietyInstalled(context) | Boolean | Checks if the [ad]xiety app is currently installed on the user device. |
| launchRenewal(context, forceSandbox?) | Unit | Deep-links user to [ad]xiety app renewal card. In debug builds (FLAG_DEBUGGABLE), automatically appends &sandbox=true to activate 0-second testing without ads. |
Developer Sandbox & Ad Network Protection
How to test your paywalls, gatekeepers, and renewal handshakes rapidly without watching ads, without touching ad networks, and with zero risk of invalid traffic policy flags.
The SDK automatically detects when your app is running in debug mode (FLAG_DEBUGGABLE) and requests sandbox mode during renewal deep links. Zero test code or if (DEBUG) wrappers required in your production source.
When a debug host opens the [ad]xiety renewal sheet, a dedicated Instant Pass Refill (0s) action appears. Tapping it instantly mints an authentic cryptographic pass in <0.5s without playing video ads, returning directly to your app.
During sandbox testing, zero ad requests are dispatched to DSP auction servers (AppLovin MAX, Unity, Liftoff). Developers and QA can test hundreds of times a day without triggering automated self-click fraud bans.
The 4-Layer Anti-Abuse Security Model
How the platform guarantees that developer test bypasses can never be exploited by end-users or rogue apps to bypass real rewarded ads:
In Google Play production builds of the [ad]xiety companion app, the 0-second instant refill code path is completely compiled out or disabled. Production users only ever see verified ad breaks.
The IPC ContentProvider verifies caller package certificates via Binder.getCallingUid(). If a production release keystore is detected, sandbox bypass is strictly rejected.
Google Play strictly forbids uploading apps with android:debuggable="true", ensuring commercial apps never leak debug flags to consumer devices.
On standalone debug companion builds, Instant Refill is restricted exclusively to packages ending in .debug or .pilot, with transient 24-hour expiration limits.
Client SDK Privacy & Architectural Declarations
Factual specifications of the [ad]xiety Client SDK for publisher store listings, compliance audits, and privacy disclosures.
No INTERNET permission
No AD_ID permission
Zero analytics or logs
Zero external transmission
SDK Technical & Regulatory Declarations
The Client SDK does not collect, log, profile, or store personal information, device identifiers, locations, contacts, or app activity.
The Client SDK does not transmit or share any user, device, or usage data with ad networks, analytics brokers, or external servers.
The Client SDK manifest declares no network permissions (android.permission.INTERNET is not requested). The SDK cannot open sockets or execute HTTP/S calls.
The Client SDK contains no ad mediation adapters, video players, or ad network libraries. All advertising execution is quarantined strictly within the external [ad]xiety app.
All token verification and status queries execute entirely on-device via local Android ContentProvider / AIDL IPC with cryptographic signature checks.
The SDK operates as a standalone offline dependency. Host applications determine their own store disclosures based exclusively on their own native features.
You can mathematically verify that your compiled APK contains zero network permissions and that all SDK API classes are preserved under R8 whole-program optimization:
# 1. Verify zero network capability (returns 0 lines): aapt dump permissions app-release.apk | grep -i "INTERNET" # 2. R8 / ProGuard consumer rules are automatically bundled inside adxiety-client-1.0.0.aar. # Zero manual rules are required in your host app's proguard-rules.pro.
Optional Privacy Policy Drop-In Clause
If you disclose third-party SDKs in your app's privacy policy, you may use this factual disclosure:
This application uses the [ad]xiety Client SDK for optional feature access passes. The SDK operates 100% offline via local inter-process communication, declares no network permissions (android.permission.INTERNET is not requested), requests no Google Advertising ID (AAID), and collects no personal data or device identifiers. All sponsored attention verification occurs exclusively within the external [ad]xiety application.