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 Kotlinobject, so every member is called statically. All members carry
@JvmStatic, so Java callers use AppstackAttributionSdk.configure(...) too.
configure()
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.
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.
Deprecated overloads
Deprecated overloads
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()
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()
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()
String?
The install’s Appstack ID, or
null before the SDK has minted one.isSdkDisabled()
true before
configure() has run, and whenever remote configuration has switched it off.
Boolean
true when the SDK is disabled.isConfigured()
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()
Boolean
true when the SDK is ready and enabled.getLastInitError()
Throwable?
The last initialization error, or
null if there has not been one.handleAppLink()
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()
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()
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()
refreshConfig()
Types
EventType
INSTALL is tracked by the SDK itself. You do not need to send it.LogLevel
AppstackSdk.
NONE silences the SDK entirely. Defaults to INFO.
LinkOptions
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
String?
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
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
code carries the status.