Android SDK Initialization

Sonde Health API Platform Documentation

Android SDK Initialization

๐Ÿ“˜ Module 1: SDK Initialization

Overview

This guide helps Android developers integrate the Passive SDK into their application. The following steps outline how to properly initialize the SDK in your Android app using your provided credentials.

ย 

๐Ÿ›  Prerequisites

Before starting, ensure that:

  • You have access to your Client ID, Client Secret, and optionally Client Code (use null if unavailable).

  • Youโ€™ve added the Passive SDK to your project dependencies.

ย 

๐Ÿงฉ Step 1: Import Required Classes

In your Application class, import the SDK initialization and callback interfaces:

import sonde_passive.client.SondeSdk
import sonde_passive.client.util.SondeInitCallback

ย 

โš™๏ธ Step 2: Initialize the SDK

Initialize the SDK inside the onCreate() method of your custom Application class. Make sure this is done after calling super.onCreate().

override fun onCreate() { super.onCreate() SondeSdk.voiceAnalysisEngine.init( context = this, clientId = "<YOUR CLIENT ID>", clientSecret = "<YOUR CLIENT SECRET>", clientCode = "<YOUR CLIENT CODE>", // Pass null if not applicable callback = object : SondeInitCallback { override fun onSuccess(msg: String) { Log.d("SondeSDK", "Initialization successful: $msg") } override fun onError(error: Throwable) { Log.e("SondeSDK", "Initialization failed: ${error.message}", error) } } ) }

ย 

๐Ÿ“Œ Notes

  • Client Code is optional. If you donโ€™t have it, pass null.

  • Make sure the Application class is correctly registered in your AndroidManifest.xml.

  • Initialization must be done only once, typically during app startup.

  • Use Log.d and Log.e for better logging and debugging practices.

โœ… Next Steps

Continue with:

Module 2: Enrollment

Sonde Health