Documentation Index
Fetch the complete documentation index at: https://docs.appstack.tech/llms.txt
Use this file to discover all available pages before exploring further.
Use Cursor, Claude Code, or another AI to help you integrate the Android (Kotlin) SDK.
Appstack ID and attribution params
Afterconfigure, you can read the Appstack user ID and the attribution map for partner integrations (for example Superwall, RevenueCat).
getAppstackId()— Appstack user identifier when a partner expects$appstackIdor similar.getAttributionParams()— Attribution payload (campaign, media source, click IDs, device identifiers where available) to forward to partners.
Maven Central repository
Here, you will find the Maven Central Android SDK documentation. Please, use the latest version of the SDK available.Requirements
- Minimum SDK: Android 5.0 (API level 21).
- Target SDK: 34+
- Java Version: 8+
- Gradle: 7.0+
Initial setup
Installation
Add the SDK dependency to your app’s No additional configuration needed - the SDK will work automatically after installation.
build.gradle.kts:Initialization
Follow these steps to get the API key:
- In Appstack, from the side menu, select SDK and ensure you are selecting the correct application.
- Select the Production environment.
- Copy the API key.
Application class:Configuration parameters
Initialize the SDK with your API key. Must be called in
Application.onCreate() before any other SDK methods.contextApplication context.apiKey(String, required): Your Appstack API key.isDebug(Bool, default: false): Leave as ‘false’ for production. See Development setup if you need to test against the development environment.logLevel(LogLevel, default: Loglevel.INFO): Logging level for debugging.
Sending events
Track user actions and revenue in your activities:Available EventType valuesIt is recommended to use standard events for a smoother experience.To improve matching quality on Meta, send events including the following parameters if you can fulfill them:
EventType.INSTALL is tracked automatically on SDK initialization. Do not send it manually.EventType.LOGINUser login.EventType.SIGN_UP/EventType.REGISTERUser registration.EventType.PURCHASEPurchase transactions.EventType.SUBSCRIBESubscription events.EventType.ADD_TO_WISHLIST,EventType.INITIATE_CHECKOUTE-commerce events.EventType.START_TRIALTrial start.EventType.LEVEL_START/EventType.LEVEL_COMPLETEGame progression.EventType.TUTORIAL_COMPLETE,EventType.SEARCH,EventType.SHAREEngagement events.EventType.CUSTOMFor any other custom events.
eventEvent type from EventType enum (required).nameEvent name for custom events (optional, required when event is CUSTOM).parameters- Optional map of parameters (e.g.,mapOf("revenue" to 29.99, "currency" to "USD")).
revenueorprice(number).currency(string, e.g.EUR,USD).
email.name(first + last name in the same field).phone_number.date_of_birth(recommended format:YYYY-MM-DD).
Limitations
Platform constraints
- Android 5.0+ required (API level 21).
- Attribution only works for Play Store installations.
- Network connectivity required for event transmission (with offline queueing).
Event tracking
- The SDK must be initialized in
Application.onCreate()before tracking calls. - Custom event names should be descriptive and consistent.
- The debug overlay is only available when
isDebug = true.
Development setup
If you want to test the SDK against the Appstack development environment before shipping, follow these extra steps:- In Appstack, from the side menu, select SDK, switch to the Development environment, and copy the Development API key. This key is separate from your production key.
- In your
configure(...)call, use the development key and setisDebug = true:
isDebug flag must match the key you’re using: development key with isDebug = true, production key with isDebug = false. The flag tells the SDK which environment URL to route to.
Debug mode
Shows debug overlay with SDK status and event information. Only works when isDebug = true.
Example:
Superwall
To start using the Superwall integration, click here to see the correct SDK documentation.Support
For questions or issues:- Check the GitHub Repository.
- Contact our support team at support@appstack.tech
- Open an issue in the repository.
Use Cursor, Claude Code, or another AI to Validate your existing implementation of the Appstack Android SDK (Kotlin) integration.