Sleep Cycle SDK

Android Release Notes

Version 1.4.0

New Features

  • Telemetry options: initialize() accepts a telemetry: TelemetryConfig parameter with two independent switches, analytics and errorReporting, putting the telemetry the SDK sends under your app's control.

API Changes

  • Added telemetry: TelemetryConfig parameter to initialize(), defaulting to TelemetryConfig(analytics = false, errorReporting = true).

Improvements

  • Various bug fixes and improvements.

Version 1.3.4

Improved microphone setup on devices that do not support the requested audio format.

Version 1.3.3

Fixed a crash during microphone setup.

Version 1.3.2

Bug fixes and improvements.

Version 1.3.0

New Features

  • Slim SDK variant: The SDK now ships as two artifacts built from the same source and exposing the same com.sleepcycle.sdk API. com.sleepcycle.sdk:sdk-android embeds the encrypted ML models in the AAR as before, while the new com.sleepcycle.sdk:sdk-android-slim ships without them and downloads the models required by your granted features on the first initialize(), cutting roughly 15 MB of model assets out of the artifact. Depend on exactly one of the two; no code changes are needed to switch. See the Installation section of the Android guide.
  • Download progress: initialize() accepts an onDownloadProgress: ((Float) -> Unit)? callback reporting model download progress as a fraction in 0.0..1.0. It is invoked with 1.0 immediately when nothing needs to be downloaded, so the same code works with both artifacts.
  • Updating the smart alarm during a session: updateSmartAlarm(config: SmartAlarmConfig?) replaces the alarm an active session started with, adds one to a session started without an alarm, or cancels it when passed null. The config is persisted, so a session resumed after a process death continues with it, and an alarm that already fired is re-armed by a new config.
  • Clearing persisted state: clear(context) destroys the SDK and wipes the cached authorization token, the stored content key, and any downloaded models. The next initialize() re-authorizes and re-downloads what it needs.
  • Discarding resumable sessions: clearActiveSessions() ends the sessions resumeAnalysis() would pick up and discards their results, making isResumePossible() return false again.

API Changes

  • Added onDownloadProgress: ((Float) -> Unit)? parameter to initialize(). It now also throws the new SdkResourceException when a model required by the granted features cannot be provisioned, and SdkNotEnoughDiskSpaceException when there is not enough free space to download the models.
  • Logger.setLogLevel(level) has been removed from the Logger interface. Log level filtering is now applied by the SDK, so a custom Logger only needs to implement d(), i(), w(), and e(). Set the level through the logLevel parameter of initialize() and SleepCycleSdk.setLogLevel() as before.
  • startMultiChannelAnalysis() now throws SdkFeatureUnavailable when a smartAlarmConfig is given for a channel other than AnalysisChannel.PRIMARY, instead of silently ignoring it.
  • destroy() no longer ends active sessions. It stops the data source and leaves the sessions resumable, so a session interrupted by an app shutdown can be picked up again with resumeAnalysis(). Call stopAnalysis() or stopDataSource() first to end them, or clearActiveSessions() afterwards.

Improvements

  • Lower memory and CPU use: Inference sessions now use substantially less memory and CPU time over a night of analysis.
  • Various bug fixes and improvements.

Version 1.2.1

Improvements

  • Smaller SDK footprint: The SDK now bundles a minimal build of ONNX Runtime instead of the full runtime, shrinking the native library by roughly 24 MB per architecture.
  • Improved audio classification: Updated audio classification model for improved sound detection.

Version 1.2.0

New Features

  • Sleep score: Compute a per-night sleep score with SleepScoring.compute(result, history, dateOfBirthSecondsUtc, chronoType), which returns a SleepScore with total, duration, quality, and routine subscores (each 0.0–1.0). Build history entries from a completed result via AnalysisResult.toSleepScoreHistoryEntry() and derive the user's ChronoType with SleepScoring.identifyChronoType(history).
  • Extended audio events: New extendedAudioEvents feature flag exposes additional EventType values beyond the standard set.
  • Real-time sleep staging in results: AnalysisResult now includes realTimeSleepStageIntervals, the sleep stages emitted live during the session (in addition to the post-session sleepStageIntervals).

API Changes

  • AudioEventListener.onAudioAnalysisBatchCompleted() now receives audioProbability: Map<EventType, Float>, the per-batch probability for each event type. The rms: FloatArray parameter has been replaced by dbSpl: FloatArray, providing A-weighted sound volume in dB SPL.
  • EventEndedInfo now includes an eventType: EventType property.
  • AnalysisResult now includes timeZoneId: String (the IANA time zone captured at session start) and realTimeSleepStageIntervals: List<SleepStageInterval>.

Version 1.1.1

New Features

  • Smart alarm: Configure a wake-up window via SmartAlarmConfig and observe alarm lifecycle events (Armed, Triggered) through the new smartAlarmFlow: SharedFlow<SmartAlarmEvent>. Trigger reasons include OPTIMAL_WAKE_UP, USER_INTERACTION, and WINDOW_END. Smart alarm is gated behind SleepAnalysisFeatures.smartAlarm and only supported on the primary channel.
  • Stereo channel separation: New ChannelSeparationConfig controls how stereo audio channels are assigned to analysis channels, with built-in presets BED_SIDE_MICS, CENTERED_MIC_ARRAY, and DETECTION_STRENGTH_ONLY.

API Changes

  • Added smartAlarmConfig: SmartAlarmConfig? parameter to startAnalysis() and startMultiChannelAnalysis().
  • Added channelSeparationConfig: ChannelSeparationConfig parameter to startAnalysis(), startDataSource(), and resumeAnalysis().
  • Added forceTokenRefresh: Boolean parameter to initialize() to force a fresh token fetch even if a cached token exists.
  • resumeAnalysis() now returns List<ResumedSession> instead of Boolean, providing session ID, channel, and smart alarm config for each resumed session.
  • createLiveDataSource() now enables the gyroscope when the accelerometer is enabled.
  • stopDataSource() and stopAnalysis() no longer throw when the SDK is not initialized; they return gracefully instead.

Version 1.1.0

New Features

  • Multi-channel analysis: Analyze two channels simultaneously using stereo audio. New startDataSource() / stopDataSource() methods separate the data source lifecycle from session lifecycles, with per-channel start via startMultiChannelAnalysis(channel:) and per-session stop via stopAnalysis(sessionId:).
  • Audio health monitoring: New audioHealthFlow: SharedFlow<AudioHealthUpdate> emits real-time audio input health status changes (HEALTHY, FLATLINE, MISSING_INPUT). AudioStatistics and AudioHealthInterval are included in the analysis result.
  • Session IDs on all public types: Event, BreathingRate, SleepStageInterval, AudioClip, and AudioHealthUpdate now include a sessionId: UUID property to identify which session they belong to.

API Changes

  • startAnalysis() now returns a UUID identifying the session.
  • Added tag: String? parameter to startAnalysis() for labeling sessions.
  • AudioEventListener.onAudioAnalysisBatchCompleted() now includes a sessionId: UUID parameter.
  • AnalysisResult now includes sleepStageIntervals, audioStatistics, and sessionId properties.
  • Added multiChannelAnalysis to SleepAnalysisFeatures.

Version 1.0.10

Released: January 26, 2026

New Features

  • Disk space checking: The SDK now checks for sufficient disk space before starting analysis and throws SdkNotEnoughDiskSpaceException if there is insufficient space available.

API Changes

  • Added SdkNotInitializedException exception thrown when SDK methods are called before initialization.
  • Added @throws documentation for SdkNotInitializedException and SdkNotEnoughDiskSpaceException on startAnalysis().

Bug Fixes

  • Improved error handling when writing to the database to prevent crashes on low disk space.

Version 1.0.9

Released: January 15, 2026

New Features

  • Preferred audio device: Added ability to specify a preferred audio input device via the preferredDevice parameter in createLiveDataSource().

API Changes

  • Added support for stereo audio input.
  • The dataSource parameter in startAnalysis() and resumeAnalysis() is now mandatory (non-nullable) with a default value of createLiveDataSource().
  • Added createLiveDataSource() factory method for creating a live data source that captures from device sensors.
  • Made LiveDataSource class public, allowing direct instantiation for custom configurations.
  • Extended DataSource interface with new methods:
    • audioOutputEnabled() - Check if audio output is enabled
    • accelerometerOutputEnabled() - Check if accelerometer output is enabled
    • getAudioFormat() - Returns the audio channel configuration (MONO or STEREO)
  • Published artifact now includes source files (excluding internal package) for easier debugging.

On this page