Sonde Health API Platform Documentation
Getting Started: Sonde Edge SDK (Android and iOS)
Notes:
For trade-off between Sonde Edge SDK vs Sonde Cloud API refer to Getting Started - Choose Sonde Cloud API or Sonde Edge (Android) API
Getting Started: Android Edge SDK
Supported API Level
Android API Level 23 and above
Setting Up Edge SDK in your Android Project
Please contact support@sondehealth.com to get Android Edge SDK. In your email, please include the company name, developer name(s), email, and contact telephone number. Our support and sales team will review the request and may contact you for additional information. If approved, the Sonde support team will share the SDK.
Our Sonde support team will share an email with a link to download the SDK.
To start with the Sonde SDK, please open an account with Sonde.
Review the SDK account creation page to create it.
Once you open an account with Sonde, you will receive a Test key, which will consist of the Client Secret and Client ID.
The above IDs will be required in step 6.
The above information is required for SDK health check metering. For additional metering information, Please refer Metering Meta-Data page.
After downloading the SDK, copy the downloaded /Users/ABC/sonde-android-edge-sdk-v1.0.0.aar file to libs folder of your app module.
Add the below statement in build.gradle file of your app module.
Replace the $version with the respective dependency version
apply plugin:"kotlin-android" apply plugin:"kotlin-kapt" dependencies { implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs') implementation 'com.squareup.retrofit2:retrofit:$version' implementation 'com.google.code.gson:gson:$version' implementation 'com.squareup.retrofit2:converter-gson:$version' implementation 'androidx.lifecycle:lifecycle-livedata-ktx:$version' implementation "androidx.room:room-runtime:$version" kapt "androidx.room:room-compiler:$version" implementation "androidx.room:room-ktx:$version" implementation "net.zetetic:android-database-sqlcipher:$version" implementation "androidx.security:security-crypto:$version" }
Add Test Key ID’s to SDK init
In application class initialize the Sonde’s sdk as below
(Replace clientId & clientSecret with values Partner got from step 3 mentioned above)
override fun onCreate() { super.onCreate() SondeEdgeSdk.init( this, "clientId", "clientSecret", object : SondeEdgeSdk.SondeInitCallback { override fun onError(error: Exception) { } override fun onSuccess() { } } ) }
Enable microphone permission to record the audio file. Add the below statement in the AndroidManifest.xml file of your app module.
<uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.INTERNET" />
SDK requires metering. For billing and building personalized models, usage metering and meta-data are uploaded to the backend. Data includes scores, date/time stamp, users YOB, gender scores, and device OS and model. This data is uploaded through the SDK to Sonde’s AWS backend. This data is accessible to Partner, and a summary of the data captured is included in usage billing. Data upload is initiated when internet connectivity is available. For additional metering information, Please refer Metering Meta-Data page.
Clean and build the project to access the Edge SDK classes.
Edge SDK Use-Cases
Getting Started: Sonde iOS Edge SDK
Prerequisites
Xcode 12.0+
Swift projects must use Swift 4.0 or higher
Support for iOS 12.0+
Setting Up Edge SDK in your iOS Project
Please contact support@sondehealth.com to get iOS Edge SDK. In your email, please include the company name, developer name(s), email, and contact telephone number. Our support and sales team will review the request and may contact you for additional information. If approved, the Sonde support team will share the SDK.
Our Sonde support team will share an email with a link to download the SDK.
To start with the Sonde SDK, please open an account with Sonde.
Review the SDK account creation page to create it.
Once you open an account with Sonde, you will receive a Test key, which will consist of the Client Secret and Client ID.
The above IDs will be required in step 7.
The above information is required for SDK health check metering.
Add the framework to your project
There are two methods to embed the SDK in your projectDrag Sonde_SDK.xcframework to the Xcode project. Make sure to select “Copy items if needed”
ORRight-click on your project and select “Add Files to<Your Project Name>” and add the Sonde_SDK.xcframework from the download section or from the path where you have saved the Sonde_SDK.xcframework folder. Then click on add and make sure to select “Copy items if needed”
Embed and sign for the actual device (optional step for Simulator)
To execute your project on the real/actual device, select your Xcode project. Go to the “General” Tab in “Targets” and under “Frameworks, Libraries, and Embedded Content,” check for Sonde_SDK.xcframework, and select “Embed & Sign” under the “Embed” section.Add microphone privacy permission
Go to the Info.plist and add the audio usage description key: “Privacy - Microphone Usage Description” and add a message to be shown to the user in its “value” section.Add Test Key ID’s to SDK init file:
Open the AppDelegate File, in the “didFinishLaunchingWithOptions“ method, add the following line of code
SDK requires metering. For billing and building personalized models, usage metering and meta-data are uploaded to the backend. Data includes scores, date/time stamp, users YOB, gender scores, and device OS and model. This data is uploaded through the SDK to Sonde’s AWS backend. This data is accessible to Partner, and a summary of the data captured is included in usage billing. Data upload is initiated when internet connectivity is available. For additional metering information, Please refer Metering Meta-Data page.
Clean and build the project, to access the Edge SDK.
Edge SDK Use-Cases
Sonde Health