Android SDK Overview
ZetaCore Android is the Zeta Marketing Platform (ZMP) SDK for Android. It gives your app a single integration point for user identity, event tracking, push notifications, in-app messages, and the app inbox.
SDK version: This documentation covers Android SDK 1.0.0. For earlier versions, see Prior Android SDK guides.
This guide is for Android developers integrating the Zeta SDK into a consumer app. It covers what the SDK provides, how to get started, and where to find detailed documentation for each feature.
On this page
Features
- User identity -- identify users with a
uidoremailId, add email and phone contacts, attach custom properties. See Contact Management. - Event tracking -- auto-tracked lifecycle events, screen-name tracking, and fully custom events. See Contact Management.
- Push notifications -- Firebase Cloud Messaging integration, notification configuration, deep linking, action callbacks. See Push Notifications.
- In-app messaging -- foreground, SDK-rendered messages with optional email collection. See In-App Messaging.
- App inbox -- a persistent, queryable store of messages delivered to the user. See App Inbox.
- Offline-first -- events and user property updates are queued locally and synced automatically when connectivity is available.
Requirements
| Minimum | |
|---|---|
| Android API level (minSdk) | 24 (Android 7.0) |
| Compile SDK (compileSdk) | 34 (Android 14) |
| Kotlin | 1.9+ |
| Gradle | 8.4+ |
| Android Gradle Plugin | 8.2+ |
Note: Java consumers must set
compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 }in their module-levelbuild.gradleto use lambda syntax with the SDK's callback APIs.
Quickstart
Get from zero to a tracked event in under five minutes.
- Add the SDK dependency to your module-level
build.gradle.kts. - Initialize the SDK in your
Application.onCreate(). - Send your first event.
// build.gradle.kts
dependencies {
implementation("net.zetaglobal.app:core:1.0.0")
}
import net.zetaglobal.app.zetacore.ZTConfig
import net.zetaglobal.app.zetacore.ZetaClient
import net.zetaglobal.app.zetacore.network.ZTRegion
import net.zetaglobal.app.zetacore.common.ZTAppEnvironment
val config = ZTConfig(
clientSiteId = "your-site-id",
clientSecret = "your-secret", // load from secure storage
optIn = true,
region = ZTRegion.US,
appEnvironment = ZTAppEnvironment.PRODUCTION
)
ZetaClient.initialize(applicationContext, config)
ZetaClient.event.send("app_launched", mapOf("source" to "quickstart"))
import net.zetaglobal.app.zetacore.ZTConfig;
import net.zetaglobal.app.zetacore.ZetaClient;
import net.zetaglobal.app.zetacore.network.ZTRegion;
import net.zetaglobal.app.zetacore.common.ZTAppEnvironment;
ZTConfig config = new ZTConfig(
"your-secret", // clientSecret -- load from secure storage
"your-site-id", // clientSiteId
true, // optIn
ZTRegion.US, // region
ZTAppEnvironment.PRODUCTION // appEnvironment
);
ZetaClient.INSTANCE.initialize(getApplicationContext(), config);
ZetaClient.INSTANCE.getEvent().send("app_launched", Map.of("source", "quickstart"));
Important: Do not hardcode
clientSecretin your source code. Load it from a secure source (Android Keystore, remote configuration, or build-time injection) at app launch. See Data & Privacy for details.
For full configuration options and opt-in behavior, continue to Getting Started.
Module
The Android SDK ships a single module:
| Module | Purpose | Add to target |
|---|---|---|
core | Core SDK: configuration, user identity, event tracking, push notifications, in-app messages, app inbox. Required. | App module |
Installation instructions are on the Installation page.
Documentation
- Installation -- Maven Central (Gradle), ProGuard/R8, and transitive dependencies.
- Getting Started -- initialize the SDK, configure it, and handle opt-in/out.
- Contact Management -- identify users, update properties, track events.
- Push Notifications -- Firebase integration, notification configuration, deep linking, action callbacks.
- In-App Messaging -- foreground toaster-style messages and email collection.
- App Inbox -- persistent, queryable message store.
- API Reference -- feature-grouped index of every public type.
- Changelog -- complete API-level changelog for every version.
- Data & Privacy -- Google Play Data Safety, offline queueing, manifest permissions.
- Versioning & Support -- SemVer policy, supported toolchain window, support channels.
Advanced topics
- Logging --
ZTLogger, log levels, and recommended setup per build type. - Push Troubleshooting -- FCM diagnostics, error codes, common issues.
- Testing and QA -- environment setup, test payloads, debug checklist.
