Android
1. Introduction
Asleep Track SDK is a software development kit that enables developers to create applications that monitor the sleep of users. The SDK provides tools and resources to integrate sleep-tracking features into mobile applications.
One of the primary features of the Asleep Track SDK is its ability to track the user's sleep in real time, including sleep stages and breathing stability. The SDK can gather information about the user's sleep patterns, including the amount of time spent in each stage of sleep. This information can be used to provide insights into the user's sleep quality and recommend improvements to their sleep habits.
Overall, Asleep Track SDK is a powerful tool for developers looking to create sleep-tracking applications. Asleep’s business partners only need to care about the UI/UX of their applications, and Asleep Track SDK will take care of all core functions for sleep monitoring.
With its advanced features and easy integration, it offers a comprehensive solution for developers looking to improve the sleep quality of their users.
2. Interfaces
2.1 Asleep.AsleepConfig
AsleepConfigcontains all the necessary configuration information, including the API key, user ID, and base URL for API communication. The configuration information of AsleepConfig is used throughout the sleep tracking features of the SDK.
2.2 Asleep.SleepTrackingManager
The SleepTrackingManager is used to manage sleep sessions for a specific user ID passed through AsleepConfig. This manager can start and stop tracking and recall the latest sleep reports from users.
2.3 Asleep.Reports
Reports is used to manage sleep reports of a specific user ID passed through AsleepConfig. This allows you to look up the IDs of all sleep session that occurred during a specific period of time, and to look up a detailed sleep report for each sleep sessionID.
2.4 Asleep.AsleepErrorCode
This document describes all available error codes to help developers understand what is happening inside the SDK.
3. Version History
Version | History |
---|---|
|
|
|
|
|
|
|
|
|
|
| Fixed obfuscation bug for sessionId in getTrackingStatus. |
| Android 14 compatibility has been addressed in the hotfix. |
| Average-stats, sleep_index are added. |
| Add snoring data to Report and Average Stats. |
| Added an optional ‘isPrivacySensitive’ parameter to ‘startSleepTracking()’ to optionally select the privacy sensitive feature of the AudioRecord. The default is true. |
|
|
| Enhancing State Management with Defensive Coding Practices |
Updated about 2 months ago