Installation
Install the Circadify Android SDK in a native Kotlin Android app.
The Circadify Android SDK is a native Kotlin Android library for contactless vital sign measurement. Your app owns the UI, camera permission prompt, preview surface, and overlays. The SDK handles camera capture, scan quality checks, secure upload, and result polling.
Before you start
You need two separate credentials from Circadify, both self-serve from the developer portal:
- A Circadify access token — authenticates the download of the SDK package from
sdk.circadify.com/maven/. This page (Steps 1–2 and Gradle setup) covers getting and using it. - An API key (
ck_live_orck_test_) — authenticates the SDK at runtime when it takes measurements. Covered under Get an API Key below.
They are different tokens with different jobs — the access token gets you the package, the API key runs the SDK. You do not need a GitHub account or GitHub PAT for the Android SDK; the same Circadify access token also installs the Web, React, and iOS SDKs.
Already installing the Android SDK from maven.pkg.github.com with a GitHub PAT (GITHUB_ACTOR / GITHUB_TOKEN)? That still works for now — nothing breaks today. To move to the new setup, replace the maven.pkg.github.com repository with https://sdk.circadify.com/maven/ and use your Circadify credentials (developer account email + Circadify access token) as shown below. GITHUB_ACTOR / GITHUB_TOKEN are no longer needed and can be removed once a Gradle build resolves the dependency from sdk.circadify.com. Switch when convenient. (Web and React now install the same way — from sdk.circadify.com with this one Circadify access token.)
Throughout this page, your username is your developer account email — the email you signed up with at developer.circadify.com — and your password is your Circadify access token. This is not a GitHub login, a Play Store credential, or a keystore password.
Step 1 — Request and retrieve your access token
com.circadify:circadify-android-sdk is distributed from https://sdk.circadify.com/maven/ and requires authentication. Gradle authenticates with HTTP Basic auth using your developer account email and your Circadify access token.
-
Request SDK access. Go to the developer portal and request SDK access with the email you want to install from. Approval is self-serve and typically lands within 24 hours.
-
Retrieve your token. Once approved, open Integrate → Android in the developer portal. Your Circadify access token and ready-to-paste install snippets appear inline in the SDK Access panel. The token isn't a one-time secret — you can return to this page anytime to copy it again or check its status. (If the panel still shows your request as pending, you'll get an email when it's approved, or contact support@circadify.com.)
All four SDKs — Web, React, iOS, and Android — install from sdk.circadify.com using this one Circadify access token — the same token works for every platform. The token is revocable — to rotate or revoke it, use the developer portal or email support@circadify.com.
Step 2 — Make your credentials available to Gradle
The Gradle setup below reads your email and token from environment variables (CIRCADIFY_MAVEN_USER / CIRCADIFY_MAVEN_TOKEN), with a gradle.properties fallback. Pick one of the two methods below.
Option A — environment variables
For local development, add these to your shell profile (~/.zshrc, ~/.bashrc, or ~/.bash_profile):
export CIRCADIFY_MAVEN_USER=<your-developer-account-email>
export CIRCADIFY_MAVEN_TOKEN=<your-circadify-access-token>bashThen reload your shell so Gradle sees them (e.g. source ~/.zshrc). Replace <your-developer-account-email> with the email you signed up with at developer.circadify.com, and <your-circadify-access-token> with the token from Step 1.
Option B — ~/.gradle/gradle.properties
If you prefer not to export environment variables, store the credentials in ~/.gradle/gradle.properties (in your home directory, outside your project):
circadifyMavenUser=<your-developer-account-email>
circadifyMavenToken=<your-circadify-access-token>propertiesThe Gradle snippet below falls back to these properties when the environment variables aren't set.
Never commit a literal token, or a gradle.properties file containing one, to source control. Keep credentials in your shell profile, in ~/.gradle/gradle.properties (your home directory, not the repo), or in a CI secret.
For CI/CD, expose the same two values as secrets. In GitHub Actions, add CIRCADIFY_MAVEN_USER and CIRCADIFY_MAVEN_TOKEN as repository secrets and map them to environment variables in your workflow. For other CI systems (GitLab CI, Bitrise, Fastlane, etc.), use that platform's secret/environment-variable mechanism. The same settings.gradle.kts credentials block works in every environment.
Gradle setup
Add the Circadify Maven repository:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven("https://sdk.circadify.com/maven/") {
credentials {
// Reads the env vars from Step 2 Option A, falling back to the
// circadifyMavenUser / circadifyMavenToken gradle.properties from Option B.
username = System.getenv("CIRCADIFY_MAVEN_USER")
?: providers.gradleProperty("circadifyMavenUser").orNull
password = System.getenv("CIRCADIFY_MAVEN_TOKEN")
?: providers.gradleProperty("circadifyMavenToken").orNull
}
authentication {
create<BasicAuthentication>("basic")
}
content {
includeGroup("com.circadify")
}
}
}
}kotlinWhen you run a Gradle build, the credentials block above uses the values you set in Step 2 to authenticate with the Circadify Maven repository and download the SDK. If you set environment variables, make sure they are present in the shell (or CI job) that runs Gradle — exporting them in one terminal does not carry over to another or to your IDE unless the IDE inherits that environment.
Add the SDK dependency to your app module:
dependencies {
implementation("com.circadify:circadify-android-sdk:0.1.2")
}kotlinManifest
The host app must declare camera and internet access. Mark camera hardware as optional unless every install target must have a camera.
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />xmlGet an API Key
This is the second credential introduced in Before you start, and it is separate from the access token Gradle used to download the package. The access token authenticates the download; an API key authenticates the SDK at runtime when it takes measurements.
Get an API key from the Keys page in the developer portal. (This is a different credential from the SDK access token in Step 1 — the access token downloads the SDK package; the API key authorizes the SDK at runtime.) Keys come in two formats, distinguished by their prefix: ck_live_ (production — real measurements, counts against your plan) and ck_test_ (sandbox — deterministic simulated vitals, free, never billed). Pass it when you initialize the SDK; read it from a secret or environment variable rather than hardcoding it. See Configuration for initialization and Authentication for key details.
Requirements
| Requirement | Value |
|---|---|
| Minimum Android version | API 24+ |
| Compile SDK | Android API 36 or newer |
| Language | Kotlin-first Android library |
| UI model | Headless SDK; your app renders preview and overlays |
| Camera stack | CameraX with a front or rear camera |
| Processing model | Headless SDK-managed capture, quality checks, and cloud result polling |
| Default capture policy | 10 FPS analysis target, 150 minimum accepted frames |
Test on the devices you plan to support before release. Camera behavior varies by device, OS version, and vendor camera implementation.
Next Steps
- Configuration - Initialize the SDK and register callbacks
- Performance & Device Support - Capture policy and lower-end device guidance
- Camera & Permissions - Request camera access correctly
- Methods - Start, cancel, and clean up measurements