Android Sonde Passive SDK Integration

Sonde Health API Platform Documentation

Android Sonde Passive SDK Integration

Overview

This page provides a step-by-step guide for integrating the Sonde Passive SDK into your Android app, covering:

βœ… SDK Initialization

βœ… User Enrollment

βœ… User Verification

πŸ› οΈ Prerequisites

Before you begin, ensure:

  • Android Studio (Electric Eel or later)

  • Android SDK API 27+ (Recommended: API 30+)

  • Kotlin 1.8.0+

πŸ“¦ How to Get the SDK

To obtain the Android Sonde Passive SDK:

1️⃣ Email support@sondehealth.com with:

  • Company Name

  • Developer Name(s)

  • Email Address

  • Contact Phone Number

2️⃣ Upon approval, you will receive:

  • SDK Download Link (.aar file)

  • Sample code for reference

  • Test credentials (Client ID and Client Secret) for initialization.

3️⃣ Create a Sonde account if you have not already done so. Review the SDK account creation page and follow the instructions.

These credentials are required for SDK initialization and health check metering.

For metering details, refer to Metering Meta-Data.

Β 

πŸ§ͺ Demo App Capabilities

Use the demo app to explore:

Β 

πŸš€ Integration Steps

1️⃣ Create Your Project

  1. Open Android Studio.

  2. Create a New Project:

    • Template: e.g., Empty Activity.

    • Language: Kotlin.

    • Minimum SDK: API 27+.


2️⃣ Add the SDK to Your Project

  1. Download the .aar file sent by Sonde.

  2. Place it in your app module’s libs folder: (Screenshot attached below)

3️⃣ Configure build.gradle

In app/build.gradle:

android { defaultConfig { minSdk 27 targetSdk 34 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } } dependencies { api fileTree(dir: 'libs', include: ['*.jar', '*.aar']) // Encrypted shared prefs implementation 'androidx.security:security-crypto-ktx:<latest_version>' // Coroutines implementation 'androidx.lifecycle:lifecycle-livedata-ktx:<latest_version>' implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:<latest_version>" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:<latest_version>" // Retrofit & Gson implementation 'com.squareup.retrofit2:retrofit:<latest_version>' implementation 'com.squareup.retrofit2:converter-gson:<latest_version>' implementation 'com.squareup.okhttp3:logging-interceptor:<latest_version>' implementation 'com.google.code.gson:gson:<latest_version>' // Room Database implementation "androidx.room:room-runtime:<latest_version>" kapt "androidx.room:room-compiler:<latest_version>" implementation "androidx.room:room-ktx:<latest_version>" // SQLCipher for encrypted Room DB implementation "net.zetetic:android-database-sqlcipher:<latest_version>" }
  • Β 

4️⃣ Add Required Permissions

Add these permissions in AndroidManifest.xml:

<!-- Basic Permissions --> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!-- Audio Recording --> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <!-- Foreground Service (Optional for Passive Mode) --> <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" /> <!-- Scheduling Exact Alarms (Optional) --> <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
  • After editing, Sync Project with Gradle Files:

    • Go to File β†’ Sync Project with Gradle Files if classes are not visible.

    Β 

Β 

⚠️ Important Notes

βœ… Physical Devices Only:

The SDK supports API Level 27+ (Android 8.1+) on physical devices.

Emulators are not supported for SDK functionalities.

βœ… Build and Clean:

Always clean and rebuild your project after adding the SDK.


🎀 SDK Modules

The Android Sonde Passive SDK includes:

Β 

Refer to the Developer guide - Background Handling, Notifications and Reminder Scheduling for advanced configurations.

Releases for Android Sonde Passive SDK

Release Versions

Release Date

Changes

Release Versions

Release Date

Changes

1

v1.0.0

8th August 2023

Initial Passive support

2

v1.0.5

30th April 2024

Initialization module, metering, continuous voice analysis

3

v1.5.14

30th June 2025

SDK 2.0: Mic handling

Β 

βœ… Next Steps

Continue with:

to complete your integration with clear, actionable instructions.

Sonde Health