Skip to main content
Supported on: Android SDK 1.0.33+
This page provides a comprehensive reference for all public methods, properties, and types in the AppDNA Android SDK.

Core Methods

Methods available directly on the AppDNA object.

Session Data Methods

Config Methods

Map Methods

Experiment Methods

Push Methods

There is no registerForPush() helper on Android. Push permission (POST_NOTIFICATIONS) is a runtime permission on Android 13+ and is requested through AppDNA.push.requestPermission(activity). See the Push guide for the full setup.

Presentation Methods

Web Entitlements


Module Namespaces

The SDK exposes the following module namespaces for direct access: Server-driven screens are accessed via top-level methods on AppDNA (showScreen, showFlow, dismissScreen, etc.) and the AppDNA.screenDelegate property — there is no AppDNA.screens module namespace.

Delegate Interfaces

AppDNALifecycleDelegate

Set it with AppDNA.lifecycleDelegate = …. Every method has a default body, so a host implements only what it cares about.
Onboarding events carry location answers unreduced. onboarding_step_completed’s selection_data and onboarding_flow_completed’s responses reach onEventTracked as the device stored them: a picked location answer arrives whole, with the address, coordinates and time zone of the place the user picked (and a Google answer’s place ID). AppDNA reduces an answer to what the geocoding providers’ terms allow only on its own server, after the event leaves the device. What you store or forward from these properties is under your terms with the provider, and for a Google answer (one carrying place_id) under your terms with Google. A Google answer you show yourself must carry Google’s attribution wherever it is shown without a Google map.
The SDK also tracks a sdk_decode_dropped event carrying the same values, so the fleet view does not depend on a host implementing this. The delegate exists so YOUR crash reporter can see your own content being dropped.

AppDNAPushDelegate

AppDNABillingDelegate

onPurchaseCompleted may also fire at app start, on setDelegate (a delivering delegate) or at identify, for a purchase whose verification failed earlier or that was made outside the app; such a report has no paywall (its purchase_completed event carries paywall_id: ""). Grant idempotently by transaction.transactionId.

AppDNAOnboardingDelegate

AppDNAPaywallDelegate

AppDNAInAppMessageDelegate

AppDNASurveyDelegate

AppDNADeepLinkDelegate


Types

AppDNAOptions

  • billingProvider — omitted = StoreKit2 (AppDNA’s own billing); RevenueCat / Adapty when that SDK owns purchases (the SDK never acknowledges; paywall taps report providerNotAvailable); None disables billing. See Billing.
  • vetoTimeout — seconds a Flutter / React Native bridge waits for a host hook; sign-in actions in onBeforeStepAdvance wait at least 120 s. Unused by a native Android host: its onBeforeStepAdvance is not timed out, onBeforeStepRender ends at 3 s and a refresh interaction at 8 s.

Environment

LogLevel

PaywallContext

OnboardingContext

PushPayload

PushAction

PushActionButton

TransactionInfo

Entitlement

status is the server’s subscription status, passed through: active, trialing, grace_period and billing_retry count as active (as on the server); any other value (for example on_hold, paused, pending, expired, canceled, revoked or refunded) does not. AppDNA.billing.hasActiveSubscription() counts active one-time products (a lifetime unlock) as well as subscriptions. AppDNA.billing.restorePurchases() throws on failure (providerNotAvailable under RevenueCat / Adapty / None; networkError / serverError under StoreKit2; an IllegalStateException — “AppDNA SDK not configured yet — call configure() first”, which billingErrorType maps to unknown — when called before configure has set billing up or after AppDNA.shutdown()) — see Billing → Restore can fail.

ProductInfo

PurchaseResult

PaywallAction

DismissReason

WebEntitlement

StepAdvanceResult

StepAdvanceResult.minimumBridgeTimeoutMs(stepData) returns 120000 when stepData["action"] is a sign-in action, else null. Wrapper bridges wait max(vetoTimeout, this) for onBeforeStepAdvance, so a sign-in hook gets at least 120 s. The native SDK itself imposes no timeout.

StepConfigOverride

FormFieldType

LocationData

Every field except formatted_address is optional. A selection — in a form-step Location field or a Location content block — fills the fields that have a value (a blank value is left out; timezone_offset only with a timezone; raw_query is the text typed to find the place); typed text without a selection returns formatted_address and raw_query only (null coordinates). The stored answer keeps address as an alias of formatted_address. mapbox_id is set only on an answer resolved through a permanent Mapbox geocode. It is an opaque marker of that, not a stable place id to look up (for an interpolated address it encodes the request that produced it and runs to hundreds of characters). place_id is set only on a Google answer (the Places id the user tapped). When a tapped suggestion cannot be resolved (with Mapbox, no permanent access on the account; with Google, the Geocoding API not enabled on the key; with either, any other provider error or a network failure), the answer is the typed text. On a resolved Mapbox answer, an address answer’s city is the place that contains the address, not the street name earlier releases stored; a place, locality, region or country answer keeps its own name as city; and a region answer also fills its own state / state_code, a country answer its own country / country_code, which earlier releases left empty. On a resolved Google answer, city is the first of the place’s locality, postal town, sublocality or second-level administrative area that Google reports — a city answer’s own name, an address answer’s town — so a region or country answer has no city: its own name is its state (a region) or its country (a country).

Server-Driven Screens

AppDNAScreenDelegate

The delegate uses untyped maps (rather than the typed ScreenResult / FlowResult data classes) so the SDK can add fields without breaking host implementations:
Common result-map keys: screen_id, dismissed, responses, last_action, duration_ms, error. Flow keys: flow_id, completed, last_screen_id, responses, screens_viewed (List<String>), duration_ms, error.

ScreenError

ScreenResult

Delivered to the showScreen top-level callback (not the delegate):

FlowResult

Delivered to the showFlow top-level callback (not the delegate):

Properties