Android SDK for Circle Digital Asset Accounts (DAA). It runs Circle's passkey ceremony (strong customer authentication, SCA) in an Android app. It also holds the end customer's Android Keystore authorization key for the React Native SDK.
The SDK holds no API key and makes no calls to Circle's APIs. Your backend does that, for example with the Node SDK, and passes your app only the short-lived token for one ceremony.
Status: sandbox only. The Owner AuthKey and device-authorization signing are not yet approved for production use.
- Android SDK reference: the callback setup, configuration, results, errors, and supported browsers
- How-to: Strong Customer Authentication: the full flow, with the backend steps
-
minSdk 23. Browser passkeys need Android 9 or later with a screen lock.
-
compileSdk 36 and Android Gradle Plugin 8.9.1 or later. The SDK depends on
androidx.browser1.9.0, which requires both. This does not change yourminSdkortargetSdk. With an older compileSdk, the build fails incheckDebugAarMetadata(orcheckReleaseAarMetadata) with:Dependency 'androidx.browser:browser:1.9.0' requires libraries and applications that depend on it to compile against version 36 or later of the Android APIs.Set
compileSdk = 36in your app module, and upgrade the Android Gradle Plugin if needed. -
A GitHub token. See Install.
The library is on GitHub Packages, which requires a token even for public
packages, so your build fails without one. Create a GitHub personal access
token (classic) with the read:packages scope. Put your GitHub username and the
token in ~/.gradle/gradle.properties, not in your project, so that you do not
commit the token:
gpr.user=<your GitHub username>
gpr.key=<your token>Then add the repository and the dependency:
// settings.gradle.kts
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven("https://maven.pkg.github.com/circlefin/daa-android-sdk") {
credentials {
username = providers.gradleProperty("gpr.user").orNull
password = providers.gradleProperty("gpr.key").orNull
}
}
}
}// app/build.gradle.kts
dependencies {
implementation("com.circle.daa:daa-android-sdk:0.8.0")
}Before 1.0.0, a minor version can break the API, so pin an exact version. If you also use the React Native SDK, use the version it pins.
Set up the callback first. The Android SDK reference has the details:
- Choose an
httpscallback URL on a domain you control, for examplehttps://app.example.com/sca/callback. Circle registers onlyhttpscallback URLs. No port and no IP address. - Register the exact URL with Circle for each environment.
- Declare
com.circle.daa.sdk.sca.DaaScaCallbackActivityin your manifest exactly as the Android SDK reference shows, with anautoVerifyintent filter for the URL. - Serve
https://<host>/.well-known/assetlinks.jsonwith your app's signing certificates. With Play App Signing, list the app signing key from Play Console, not your upload key.
Your backend sends the same URL as redirectUri when it opens each passkey
registration or challenge. Then register the contract once, as a property of
your activity, and launch it with the frame token from your backend:
private val sca = DaaScaConfig(DaaEnvironment.Sandbox, "https://app.example.com/sca/callback")
private val approve =
registerForActivityResult(DaaScaApproveContract(sca)) { result ->
when (result) {
is DaaScaResult.Completed -> {
// Send result.response to your backend exactly as returned.
}
DaaScaResult.Cancelled -> {
// The end customer closed the ceremony. Let them try again.
}
is DaaScaResult.Failed -> {
// See result.error in the Android SDK reference.
}
}
}
fun onApprove(frameToken: String) = approve.launch(frameToken)DaaScaEnrollContract registers a passkey the same way. Before you ship, read
the Android SDK reference
for results, errors, and keeping state across process death, and the
SCA how-to
for the backend steps.
DaaScaApproveContract,DaaScaEnrollContract,DaaSca: run Circle's hosted ceremony in an Auth Tab or a Custom Tab of a supported browser, never in aWebView, and return its result unchanged.DaaSecureKey: the installation-scoped, non-exportable Android Keystore P-256 AuthKey, with signing only through validated device-authorization inputs. There is no generalsign(bytes).DaaRegistrationFlowKey,DaaSecureRandom: sign-in primitives that the React Native SDK uses.
./gradlew build apiCheck # compile, unit tests, lint, public API check
./gradlew ktlintFormat # fix formattingSee CONTRIBUTING.md.
- Integration questions: contact your Circle representative.
- Bugs in this SDK: open a GitHub issue.
- Security vulnerabilities: do not file a public issue. Report them privately through Circle's Vulnerability Disclosure Program. See SECURITY.md.