ScrollLess is a high-privilege digital wellbeing application designed to help users reclaim their time from “infinite scroll” behaviors. Unlike standard apps, this module operates as a background-heavy system utility. It leverages deep Android hooks to monitor which applications are active, intercept incoming notifications to reduce dopamine triggers, and physically block access to distracting apps when predefined limits are reached.The feature’s scope spans from low-level to high-level interfaces.
The module follows a architecture, but with a unique “System-to-State” pipeline. Because the primary data source is the Android OS itself (via events), the flow is highly reactive.
Upon device start, the BootReceiver triggers the core services. The app uses a (configured via Hilt) to handle periodic data maintenance and sync tasks.
The module acts as a data aggregator, transforming raw system events into actionable insights.
Source Tables: While the DAO files aren’t shown, the manifest and dependencies confirm a implementation for storing UsageEvents and NotificationLogs.
Transformation: The ViewModel likely uses combine or flatMapLatest on to merge real-time usage from the service with user-defined limits from .
Performance: To avoid jank, all database writes from the AccessibilityService must be dispatched on Dispatchers.IO to ensure the UI thread (which the Accessibility Service shares) remains responsive.
The feature relies on a robust stack for reliability and dependency management:
Hilt: Manages the lifecycle of the Repository and Services.
Retrofit: Used for syncing usage statistics or fetching remote configurations (via SCROLL_LESS_API_KEY).
Firebase: Utilizes Analytics and Crashlytics (specifically toggled for release builds) to monitor the stability of the background services.
Lottie & Konfetti: Provides visual reinforcement/rewards when users successfully limit their screen time.
Copy
// Example of the dependency injection scope found in build.gradleimplementation(libs.hilt.android)implementation(libs.androidx.room.runtime)implementation(libs.androidx.work.runtime.ktx)