Skip to main content
The Android SDK is in Public Beta. It supports Android API 23 and later. Validate deferred installation through a Google Play test track before production use.
The open-source Kotlin-first SDK is published on Maven Central as li.biq:biqli-android.

Install

The package transitively includes Google Play Install Referrer 2.2. It requests only android.permission.INTERNET; it does not request Advertising ID, location, contacts, or storage permissions.

Configure

Call Biqli.configure once before resolving attribution, normally from Application.onCreate or the first activity:
The appId and mobile key must come from the same registered Mobile App. Never embed a biqli_... secret workspace API key. Add an intent filter for every attached hostname to the activity that receives the link:
The public assetlinks.json package and SHA-256 certificate must match the installed build. A local debug key and Google Play App Signing key are different certificates.

Resolve with coroutines

Use a singleTop activity to forward a new verified link:
Call resolution on each cold launch. Biqli.handleAppLink(intent) captures a verified HTTPS intent without resolving it. Biqli.attributionFlow(intent, consentGranted) emits the same single resolution through a Kotlin Flow.

Java callback API

Callbacks run on the main thread.

Result model

BiqliAttributionResult contains: MatchType values are EXACT_APP_LINK, EXACT_INSTALL_REFERRER, EXACT_HANDOFF, PROBABILISTIC, and NONE. Android normally returns the first, second, or NONE.

Install Referrer lifecycle

During the pending first-open window, the SDK contacts Google Play once, extracts only a valid opaque biqli_token, and closes the connection. It never persists or transmits the complete referrer string. The extracted token, pending request, app-instance ID, and cached result use Android Keystore-backed encrypted preferences. An empty referrer, unsupported service, permission error, developer error, or missing Play Store becomes a terminal clean no-match. A service disconnect or timeout remains retryable during the 24-hour first-open window. Once first-open attribution reaches a terminal result, a cold launch without a new App Link returns the cached result without creating another resolver event. The cached result excludes attributionReceipt.

Retry and timeout behavior

  • Connection timeout: 5 seconds.
  • Read timeout: 5 seconds.
  • Immediate attempts: at most three.
  • Backoff between attempts: 400 ms, then 800 ms, plus 0–250 ms random jitter.
  • Immediate retries: transport errors, HTTP 429, and HTTP 5xx.
  • Later-launch recovery: the same pending event and idempotency key remain in encrypted storage.
The SDK does not run an autonomous background retry loop. Your app must call resolution again on a later cold launch. When consentRequired is true, call:
If consent is not granted, the SDK throws BiqliException.ConsentRequired before it reads Install Referrer or contacts Biqli.

Diagnostics

When enabled, diagnostics can report:
These bounded enums intentionally omit raw URLs, referrers, handoff tokens, keys, and response payloads.

Errors

Test the published dependency

Confirm Gradle resolves the Maven Central release rather than a local project substitution, then verify the built app and installed-app App Link. The deferred Install Referrer path is proven only by a Google Play installation. Follow Test and troubleshoot mobile links.