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.breathingMetricsSmartSpectraConfig.cardioMetricsMetricType.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
PreviewViewwithsdk.config.previewSurfaceProviderfor 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
| Platform | Notes |
|---|---|
| Google Pixel 3 / 3 XL | Tested on Pixel 9, 10 |
| Samsung Galaxy S21 | Tested on A16, S21, Galaxy Flip 6 |
| Motorola Edge 30 Ultra |
For support: contact support@presagetech.com or submit a GitHub issue.