Android
1. Introduction
The Asleep SDK is a software development kit designed to easily introduce the sleep tracking features provided by the Asleep API into mobile applications. The Asleep SDK is a powerful tool for business partners who want to develop sleep applications. Asleep’s business partners focus on the core values and UI/UX of the targeted sleep application, and all key features for sleep tracking are handled by the Asleep SDK.
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.
Updated over 1 year ago