WarpLink
SDKsAndroid

API Reference

Complete Kotlin API reference for the WarpLink Android SDK.

The main entry point. Singleton object.

object WarpLink

Properties

PropertyTypeDescription
SDK_VERSIONStringThe current SDK version ("0.1.0").
isConfiguredBooleanWhether configure() has been called. Thread-safe.

configure(context, apiKey, options)

fun configure(
    context: Context,
    apiKey: String,
    options: WarpLinkOptions = WarpLinkOptions()
)

Initialize the SDK. Must be called before any other SDK methods.

ParameterTypeDescription
contextContextAndroid context (typically Application). Retains applicationContext.
apiKeyStringYour WarpLink API key (wl_live_ or wl_test_ + 32 alphanumeric chars).
optionsWarpLinkOptionsConfiguration overrides.

Throws: WarpLinkError.InvalidApiKeyFormat if the key format is invalid.

handleDeepLink(uri, callback)

fun handleDeepLink(
    uri: Uri,
    callback: (Result<WarpLinkDeepLink>) -> Unit
)

Resolve an incoming App Link URI to a deep link.

ParameterTypeDescription
uriUriThe App Link URI from intent?.data.
callback(Result<WarpLinkDeepLink>) -> UnitCalled on the main thread.

Errors: NotConfigured, InvalidUrl, LinkNotFound, NetworkError, ServerError, InvalidApiKey, DecodingError

checkDeferredDeepLink(callback)

fun checkDeferredDeepLink(
    callback: (Result<WarpLinkDeepLink?>) -> Unit
)

Check for a deferred deep link on first launch. Returns null if no match found.

ParameterTypeDescription
callback(Result<WarpLinkDeepLink?>) -> UnitCalled on the main thread.

On first launch, reads Play Install Referrer then falls back to fingerprint matching. Subsequent launches return cached result.

Errors: NotConfigured, NetworkError, ServerError, InvalidApiKey, DecodingError


WarpLinkOptions

data class WarpLinkOptions(
    val apiEndpoint: String = "https://api.warplink.app/v1",
    val debugLogging: Boolean = false,
    val matchWindowHours: Int = 72
)
PropertyTypeDefaultDescription
apiEndpointString"https://api.warplink.app/v1"API endpoint URL.
debugLoggingBooleanfalseEnable WarpLink Logcat tag logging.
matchWindowHoursInt72Match window for deferred attribution (hours).

data class WarpLinkDeepLink(
    val linkId: String,
    val destination: String,
    val deepLinkUrl: String? = null,
    val customParams: Map<String, Any> = emptyMap(),
    val isDeferred: Boolean = false,
    val matchType: MatchType? = null,
    val matchConfidence: Double? = null
)
PropertyTypeDescription
linkIdStringUnique link identifier.
destinationStringResolved destination URL.
deepLinkUrlString?Android-specific deep link URL (e.g., myapp://path).
customParamsMap<String, Any>Custom parameters on the link.
isDeferredBooleanWhether resolved via deferred attribution.
matchTypeMatchType?DETERMINISTIC or PROBABILISTIC.
matchConfidenceDouble?Confidence score (0.0–1.0).

MatchType

enum class MatchType {
    DETERMINISTIC,
    PROBABILISTIC
}
ValueDescription
DETERMINISTICMatched via Play Install Referrer. Confidence is always 1.0.
PROBABILISTICMatched via enriched fingerprint. Confidence varies.

WarpLinkError

sealed class WarpLinkError(
    message: String,
    cause: Throwable? = null
) : Exception(message, cause)
SubclassDescription
NotConfiguredSDK used before configure().
InvalidApiKeyFormatKey format invalid. Thrown by configure().
InvalidApiKeyKey rejected by server.
NetworkError(cause)Network request failed.
ServerError(statusCode, message)API error response.
InvalidUrlNot a recognized WarpLink domain.
LinkNotFoundLink not found or inactive.
DecodingError(cause)Response parsing failed.

Thread Safety

  • isConfigured is thread-safe (protected by synchronized)
  • All callbacks are dispatched to the main thread
  • configure() can be called from any thread but should be called once during initialization

On this page