Maven Central repositoty
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:Configuration parameters
Initialize the SDK with your API key. Must be called in Debug modeShows debug overlay with SDK status and event information. Only works when
Application.onCreate() before any other SDK methods.Parameters:context- Application contextapiKey- Your Android API key from the Appstack dashboardisDebug- Optional debug mode flag (default: false)logLevel- Optional log level configurationendpointBaseUrl- Optional custom endpoint
isDebug = true.Example: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- App installation (tracked automatically)EventType.LOGIN- User loginEventType.SIGN_UP/EventType.REGISTER- User registrationEventType.PURCHASE- Purchase transactionsEventType.SUBSCRIBE- Subscription eventsEventType.ADD_TO_CART,EventType.ADD_TO_WISHLIST,EventType.INITIATE_CHECKOUT- E-commerce eventsEventType.START_TRIAL- Trial startEventType.LEVEL_START,EventType.LEVEL_COMPLETE- Game progressionEventType.TUTORIAL_COMPLETE,EventType.SEARCH,EventType.VIEW_ITEM,EventType.VIEW_CONTENT,EventType.SHARE- Engagement eventsEventType.CUSTOM- For any other custom events
event- Event type from EventType enum (required)name- Event 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)
emailname(first + last name in the same field)phone_numberdate_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
Support
For questions or issues:- Check the GitHub Repository
- Contact our support team at support@appstack.tech
- Open an issue in the repository