Circadify

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:

  1. 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.
  2. An API key (ck_live_ or ck_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.

Migrating from GitHub Packages

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.)

Note

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.

  1. 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.

  2. 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.)

Note

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>
bash

Then 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>
properties

The Gradle snippet below falls back to these properties when the environment variables aren't set.

Caution

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.

Tip

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:

settings.gradle.kts
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")
            }
        }
    }
}
kotlin
Note

When 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:

app/build.gradle.kts
dependencies {
    implementation("com.circadify:circadify-android-sdk:0.1.2")
}
kotlin

Manifest

The host app must declare camera and internet access. Mark camera hardware as optional unless every install target must have a camera.

AndroidManifest.xml
<uses-feature android:name="android.hardware.camera" android:required="false" />
 
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
xml

Get 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

RequirementValue
Minimum Android versionAPI 24+
Compile SDKAndroid API 36 or newer
LanguageKotlin-first Android library
UI modelHeadless SDK; your app renders preview and overlays
Camera stackCameraX with a front or rear camera
Processing modelHeadless SDK-managed capture, quality checks, and cloud result polling
Default capture policy10 FPS analysis target, 150 minimum accepted frames
Note

Test on the devices you plan to support before release. Camera behavior varies by device, OS version, and vendor camera implementation.

Next Steps