Follow the guideline for testing the sleep tracking
To accurately test Asleep's sleep tracking/analysis, please follow the test environment guide. Please note that sleep analysis results obtained in environments not adhering to this guide may not accurately reflect actual sleep patterns.
fun requestAnalysis(analysisListener: SleepTrackingManager.AnalysisListener)
Parameter Name
Type
Description
analysisListener
AnalysisListener
sleep analysis listener
Asleep.SleepTrackingManager.AnalysisListener
interface AnalysisListener {
fun onSuccess(session: Session)
fun onFail(errorCode: Int, detail: String)
}
If success, onSuccess() is called.
Session data type
data class Session(
val id: String?,
val state: String?,
val startTime: String?,
val endTime: String?,
val sleepStages: List<Int?>?,
val breathStages: List<Int?>?
)