Skip to main content
Every public symbol in the tech.appstack.android-sdk:appstack-android-sdk artifact. For installation and integration guidance, see the Kotlin SDK guide. Current stable release: 1.11.0, published 16 September 2026. See the changelog for everything that changed.

AppstackAttributionSdk

A Kotlin object, so every member is called statically. All members carry @JvmStatic, so Java callers use AppstackAttributionSdk.configure(...) too.

configure()

Starts the SDK. Call once from Application.onCreate(). A repeat call is a no-op, including its customerUserId, so use setCustomerUserId() to set the ID later.
Context
required
Application context.
String
required
Your app’s Appstack API key, from the dashboard under app settings.
LogLevel
default:"LogLevel.INFO"
Logcat verbosity under the tag AppstackSdk. See LogLevel.
InitListener?
default:"null"
Callbacks for initialization success and failure. See InitListener.
String?
default:"null"
Your identifier for the signed-in user, when known at launch.
Three earlier configure() shapes remain callable and delegate to the current one. Each carries ReplaceWith("configure(context, apiKey, logLevel, listener, customerUserId)"), so the IDE can migrate them automatically.

setCustomerUserId()

Sets your own identifier for the signed-in user, so Appstack can join server-to-server events, which identify the user by this ID rather than by the install, back to their install. Prefer this over the configure() parameter when the ID is only known after launch, which is usually the case. It applies to every event sent from here on, including any sendEvent() buffered during startup, but establishes nothing on its own: at least one event has to follow. Callable from any thread, before or after configure(); last write wins.
String?
required
Your identifier for the signed-in user. Set it as soon as it is known.

sendEvent()

Sends an event. Safe to call before configure() completes: events arriving early are buffered and flushed once configuration finishes.
EventType
required
The event to send. Prefer a standard case over CUSTOM wherever one fits. See EventType.
String?
default:"null"
The event name. Required when event is CUSTOM, ignored otherwise.
Map<String, Any>?
default:"null"
Event properties. For revenue events send revenue and currency. Matching parameters (email, name, phone_number, date_of_birth, gender) are encrypted on device before being used for attribution matching. See enhanced app campaigns.

getAppstackId()

Returns the stable local Appstack identity for this install.
String?
The install’s Appstack ID, or null before the SDK has minted one.

isSdkDisabled()

Whether the SDK is disabled and sending nothing. It reports true before configure() has run, and whenever remote configuration has switched it off.
Boolean
true when the SDK is disabled.

isConfigured()

Whether configure() has been called and the SDK’s components exist. This says nothing about whether the SDK is enabled: use isEnabled() for that.
Boolean
true once configure() has run.

isEnabled()

Whether the SDK is configured and remote configuration has it switched on.
Boolean
true when the SDK is ready and enabled.

getLastInitError()

The most recent initialization failure, for apps that prefer polling over an InitListener.
Throwable?
The last initialization error, or null if there has not been one.
Handles a tapped App Link for an app that is already installed, parsing the deeplinkId and query parameters directly off the URI with no network round trip. Safe to call before configure().
The OS intercepts this tap, so no click event is recorded server-side. If you want to count it as re-engagement, call sendEvent() yourself.
Uri
required
The tapped link. The Intent overload reads intent.data for you, so you can pass the intent straight from onCreate() or onNewIntent().
LinkOptions
default:"LinkOptions()"
Optional host filtering. See LinkOptions.
AppLinkResult?
The parsed link, or null when the URI is not a recognised Appstack link.

getAttributionParams()

Returns the attribution parameters known right now, without waiting. Use awaitAttributionParams() when the match may still be in flight.
String?
default:"null"
An Install Referrer string to merge in, when your app already holds one.
Map<String, String>
Attribution parameters, empty when none are known yet.

awaitAttributionParams()

Suspends until the initial attribution match finishes, then returns the parameters. Prefer this over a fixed delay after launch.
String?
default:"null"
An Install Referrer string to merge in, when your app already holds one.
Map<String, String>
Attribution parameters once the match phase has completed.

deleteUserData()

Permanently deletes this install’s Appstack data, for GDPR and privacy requests. On success, locally cached attribution data is cleared too.

refreshConfig()

Re-fetches remote configuration. The SDK does this itself at startup, so this is only for apps that need to pick up a configuration change mid-session.

Types

EventType

Standard attribution events. Names follow the SNAKE_CASE convention used by mobile measurement partners, and the value sent over the wire is the name itself. Where two names are synonymous, both are provided for compatibility with existing integrations.
INSTALL is tracked by the SDK itself. You do not need to send it.

LogLevel

Verbosity of the SDK’s integrator-facing logcat output, under the tag AppstackSdk. NONE silences the SDK entirely. Defaults to INFO.

LinkOptions

Optional filtering for incoming links. Requires no network access or SDK initialization.
Set<String>?
default:"null"
Hosts to accept. A link on any other host returns null. null accepts any host. This does not verify domain ownership: your app decides what to route.

AppLinkResult

A tapped App Link on an already-installed app, parsed entirely from the URI.
The single path segment of the tapped standard link, matching the deeplink_id generated server-side, as in https://links.customer.com/{deeplinkId}.
Map<String, String>
Query parameters on the tapped URL, percent-decoded, with the last value winning for a repeated name. Missing values become empty strings. Includes any custom parameter a marketer attached to the link, such as deep_link_path.
Uri
The full tapped URI.

InitListener

Callbacks for observing the outcome of configure(). As a fun interface, a lambda passed to configure() implements onError. Implement the interface explicitly when you also need onInitialized.
(Throwable) -> Unit
Invoked when initialization hits an error, such as a failed remote config fetch. After an authentication failure or a missing required install-time permission the SDK disables itself; for other errors initialization continues with a placeholder config. May be invoked on a background thread.
(Long, Long) -> Unit
Invoked on the main thread once initialization has fully completed, including the remote config fetch. mainThreadDurationMs is wall-clock time spent in the synchronous part of configure(); totalDurationMs runs from the configure() call until full initialization completed. Has a default empty implementation, so overriding it is optional.

HttpException

A non-success HTTP response from the backend. code carries the status.

AuthenticationException

The API key was rejected. The SDK disables itself when this happens.