Skip to main content
The Android SDK is available in sandbox only. Production support is on the roadmap.
The Android SDK runs in your application on the end customer’s Android-powered device. It never holds your API key and makes no calls to the Circle API itself. Your backend does that and passes your application only the short-lived token for one ceremony.

What you can do

  • Approve operations with a passkey: run passkey enrollment and approval for Strong Customer Authentication (SCA) in a Kotlin application.
  • Hold the authorization key for non-custodial accounts: the React Native SDK calls this SDK to create the end customer’s authorization key in hardware-backed key storage and sign with it. You don’t call these methods yourself. To build a non-custodial account integration, use the React Native SDK.

Requirements

The SDK depends on androidx.browser 1.9.0, which requires compile SDK 36 and Android Gradle Plugin 8.9.1. This doesn’t change your minSdk or targetSdk.

Install

The SDK is distributed from GitHub Packages, which needs a GitHub account to read even public packages. Read the values from environment variables so that no credentials are committed:
Then add the dependency to your application module:

Set up the callback

When a ceremony finishes, Circle’s page returns the result to your application. In an Auth Tab, which Chrome 137 and later supports, the result returns to the SDK directly. In a Custom Tab, it returns through a callback activity that you declare. Set up both, because the end customer’s browser decides which one runs.
  1. Choose an https callback URL on a domain that you control, such as https://app.example.com/sca/callback. The SDK refuses a URL that includes a port or an IP address, and can be up to 2,048 characters. Circle doesn’t accept custom schemes.
  2. Register every exact callback URL that you use in Circle Hub, under Settings > Digital Asset Accounts > SCA. Register separately in sandbox and production.
  3. Declare the SDK’s callback activity in your AndroidManifest.xml, with an intent filter for your callback URL:
  4. Serve https://<host>/.well-known/assetlinks.json with the delegate_permission/common.handle_all_urls relation. List the SHA-256 fingerprint of every key that signs your application, including the Play App Signing key and your debug key. Serve it over HTTPS, without redirects, with Content-Type: application/json.
Your backend sends the same callback URL as redirectUri when it opens each passkey registration or challenge. It replaces embedOrigin, which applies only to web pages. If the value doesn’t exactly match a registered URL, Circle returns error code 420068. The ceremony runs only in a supported browser, never in a WebView: Chrome, Samsung Internet, Firefox, Firefox Focus, Firefox Klar, Edge, Brave, DuckDuckGo, Opera, Opera Mini, Vivaldi, or Seznam.

Initialize

Create a DaaScaConfig:
An invalid value throws IllegalArgumentException.

Methods

The SDK runs each ceremony as an activity result contract. Register it with registerForActivityResult, and launch it with the frame token from your backend. DaaScaResult is one of these: This example approves a transfer. Your backend opens the challenge, returns only the frame token, and later sends the transfer with the assertion:
Save transferId in onSaveInstanceState. Android can recreate your activity while the browser is open. For the backend steps, see How-to: Implement Strong Customer Authentication.

Errors

DaaScaResult.Failed carries a DaaScaError: message is for your logs. Don’t show it to the end customer.

Versions

The SDK follows semantic versioning. Before version 1.0.0, a minor version can include breaking changes, so pin an exact version. If you also use the React Native SDK, use the Android SDK version that it pins.