SDK Overview
For the latest technology and features, and to offer users a better experience, we recommend using the 2.0 version SDK
Asleep Track's SDK, which is applied based on Docs 2.0 version, provides users with more accurate and effective sleep diagnosis by utilizing the latest sleep diagnosis data. In addition, it is perfectly integrated with the latest dashboard to provide users with the best experience. We will continue to provide additional features to improve user development experience based on Docs 2.0 version of SDK in the future.
The SDK based on Docs 1.0 version and the SDK based on Docs 2.0 version are not compatible with each other, and the types of Callback and Response provided are different.
SDK Version Policy
SDK iOS / Android available versions depending on Docs Version
Docs Version | iOS SDK Version | Android SDK Version |
---|---|---|
1.0 | SDK 1.x.x (1.0.0 ~ 1.1.6) | SDK 1.x.x (1.0.0 ~ 1.0.9) |
2.0 | SDK 2.x.x | SDK 2.x.x |
Platform
OS | SDK | Sample App |
---|---|---|
iOS | Swift | iOS Sample App |
Android | Kotlin | Android Sample App |
SDK Release
SDK Call Flow
1. INIT
2. TRACKING
- Update Audio Mel data every 30 seconds
- Android SDK only updates "zero" value when audio interruption such as phone call occurs during sleep audio recording (if more than 5 minutes out of 20 minutes audio data is zero value, inference analysis is not performed).
- iOS SDK does not handle upload behavior when audio interruptions such as phone calls occur during sleep audio recording (OS-dependent limitation)
- When tracking, you need to implement the foreground service so that you can continue tracking even if the app goes to the background.
3. REPORT
- If you request a report at a time after StopTracking but before the full sleep analysis is complete, you will receive real-time monitored sleep data, and if you request a report at a time after the full analysis is complete, you will receive the final sleep monitoring results.
- Sleep analysis is completed when it is received as a callback from the server. If you want to receive it via SDK Report, you need to request it after Delay within 1 second of StopTracking call.
Updated 9 months ago