Pre-release docs for SmartSpectra SDK 3.2.0-rc.6. This RC channel may describe APIs or install commands that differ from the latest stable release.

SmartSpectra SDK
Android

Quick Start

Get started with the SmartSpectra Android SDK — Kotlin, min SDK 28.

This repo contains two build guides that produce similar user end states:

The only difference in builds is that the API key build gets up and running very fast, but hard-codes your API key. The OAuth build is more suitable for production deployments because it avoids hard-coding your API key.

Scope

These quickstarts intentionally request only:

  • SmartSpectraConfig.breathingMetrics
  • SmartSpectraConfig.cardioMetrics
  • MetricType.EXPRESSIONS

Please see the detailed documents for additional features.

Important Implementation Rules

Start by creating a new Android app project named Cool Vitals with package name com.example.coolvitals.

The Quick Start is intended so that the developer can replace app/src/main/java/com/example/coolvitals/MainActivity.kt as a full file.

  • Use SmartSpectraSdk.shared.
  • Use PreviewView with sdk.config.previewSurfaceProvider for native CameraX preview.
  • Disable bitmap preview frames with sdk.config.imageOutputEnabled = false.
  • Buffer trace samples locally before drawing charts.
  • Keep camera permission in the activity flow with ActivityResultContracts.RequestPermission().

Choose Your Guide

Use Option 1: API Key for the fastest manual setup.

Use Option 2: OAuth if you need OAuth.

Supported Platforms

PlatformNotes
Google Pixel 3 / 3 XLTested on Pixel 9, 10
Samsung Galaxy S21Tested on A16, S21, Galaxy Flip 6
Motorola Edge 30 Ultra

For support: contact support@presagetech.com or submit a GitHub issue.

On this page