Summary
The Nudge Configuration feature allows users to control how and when the app intervenes during their screen time. Users can select specific apps to monitor, set the frequency of interruptions (nudges), and enable “Insight Nudges” that detect specific behavioral patterns like doomscrolling or rapid app switching. This module acts as the control center for defining the boundaries the app enforces.How It Works
The feature combines global preferences with per-app settings to determine when to interrupt the user.Loading the App List
When the user opens the screen, the ViewModel requests a list of all installed apps from the App Metadata Repository. Simultaneously, it fetches the current day’s configuration from the Nudges Repository to see which apps are currently enabled for nudging.
Global Configuration
The user can toggle a master switch to enable or disable all nudges. They can also open the Settings Sheet to configure global rules, such as the “Nudge Interval” (e.g., every 15 minutes) and whether nudges should respect the phone’s “Do Not Disturb” mode. These preferences are saved to the Settings Repository.
Per-App Customization
The user can scroll through their apps or use the search bar to find specific applications. Toggling the checkbox next to an app (like a social media app) updates the Nudges Repository, marking that specific app as a target for intervention.
Data Stored
This feature manages both global user preferences and specific configurations for individual apps.| Field | Type | Description |
|---|---|---|
nudgesEnabled | Boolean | Master switch to turn the entire feature on or off |
nudgeIntervalMinutes | Integer | How often (in minutes) a nudge should appear (5-60 mins) |
respectDnd | Boolean | If true, nudges are suppressed when Do Not Disturb is active |
insightNudgesEnabled | Boolean | Toggle for smart, pattern-based interventions |
packageName | String | The unique ID of an app (e.g., com.instagram.android) |
isEnabled | Boolean | Whether nudges are active for a specific app package |
Key Components
Nudges Screen
The main dashboard displaying the list of installed apps, search functionality, and master toggles.
Nudges ViewModel
Orchestrates data flow, merging installed app data with user preferences and handling bulk selection logic.
Settings Sheet
A bottom sheet allowing fine-tuning of the intervention frequency and privacy settings (Do Not Disturb).
Insight Detail Sheet
An interactive, swipeable card interface that educates the user on different types of behavioral patterns the app detects.