Media & Subscriptions✦ Flutter Developer

Sleep Cast

Bedtime Audio Stories, Ambient Sounds & Relaxation Platform

Freemium bedtime storytelling and ambient relaxation mobile platform featuring RevenueCat subscription tiers, background audio stream engine, and offline listening.

Live on Play StorePlatform Availability
★ 4.9/5User Experience Rating
99.9%Production Crash-Free Rate

Executive Product Overview & Scope

Sleep Cast (formerly Fact360) helps users fall asleep through soothing voice narrations, ambient soundscapes, and sleep science stories. The app operates on a freemium model with premium story unlocked via RevenueCat subscriptions. As the Flutter Developer, I re-engineered the audio playback architecture, fixed critical background playback memory leaks, and managed Google Play Store deployment.

Core Engineering Contributions & Technical Execution

#01

Integrated RevenueCat in-app subscriptions for premium bedtime audiobook catalog, ad-free listening, and offline downloads.

#02

Engineered a resilient background audio streaming service with lockscreen playback controls, notification center metadata, and sleep timer auto-fade.

#03

Built robust local offline audio caching with Hive DB and chunked disk streaming for uninterrupted listening without active internet.

#04

Resolved critical audio playback race conditions and memory leaks during rapid story switching and background task transitions.

#05

Implemented graceful network error fallbacks that seamlessly switch between streaming and local cached audio buffers.

#06

Managed Google Play Store publication, release keystore signing, and content safety compliance.

Key Technical Features & Highlights

RevenueCat In-App Premium Subscription & Free Trial Tiers
Background Audio Stream Service with Lockscreen Media Notification Controls
Memory-Safe Audio Controller Lifecycle & Stream Disposal Architecture
Offline-First Story Caching & Seamless Connection Fallbacks
Gradual Volume Sleep Timer Automation & Ambient Sound Mixing
Google Play Store Publishing, Compliance & Release Management

The Engineering Challenge

Audio decoders and stream subscriptions were leaking in memory when users rapidly skipped between stories in the playlist, eventually triggering Android OS Out-of-Memory (OOM) background kills. In addition, subscription status occasionally desynchronized between offline sleep sessions and online restarts.

The Architectural Solution

Architected a unified singleton `AudioPlaybackService` with strict mutex locks, explicit stream subscription cancellation, and automated controller teardown. Connected RevenueCat's local entitlement cache to the audio playback gate, validating subscription status offline for up to 30 days while scheduling silent background checks on reconnection.

Tangible Results & Measurable Impact

Achieved 99.9% crash-free sessions on Google Play Store across tens of thousands of continuous audio listening hours. Completely eradicated background audio memory leaks and delivered a seamless 4.9/5 user rating.

Technologies & Architectural Stack

Flutter
Dart
RevenueCat SDK
just_audio
audio_service
REST API
Provider
Firebase FCM
Hive DB
Back to All Projects
Google Play