Skip to main content

Overview

The Nudges Model serves as the content repository for the app’s behavioral intervention system. It defines a catalog of “Insight Nudges”—educational and corrective prompts that trigger when specific usage patterns (like “Doomscrolling” or “Morning Traps”) are detected. To the user, these represent the various “smart alerts” they can enable to build better digital habits. To the system, this module provides the metadata (titles, descriptions, and icons) required to render these interventions in the UI.

Architecture & Data Flow

This module acts as a static and configuration provider. It sits at the bottom of the UI layer, providing the “Source of Truth” for nudge descriptions.

Key Components

InsightNudgeContent

A that encapsulates the visual and textual representation of a nudge.
  • Title: The name of the behavioral pattern (e.g., “Bounce Loop”).
  • Description: A user-friendly explanation of the trigger.
  • IconRes: A reference to the Android for the associated icon.

insightNudges Catalog

A hardcoded List that acts as the registry for all supported nudges. This centralized list ensures that content remains consistent across the settings screen and the actual nudge overlays.

Operational Logic

Initialization

Since the data is defined as a top-level val, it is initialized when the class is first accessed. There is no asynchronous loading or overhead for this specific metadata.

Behavioral Categories

The model defines several distinct categories of digital behavior interventions:
  • Temporal Nudges: “Late-Night Session”, “Morning Trap”.
  • Intensity Nudges: “Long Scroll”, “Doomscrolling” (40+ minute sessions).
  • Contextual/Switching Nudges: “Bounce Loop” (rapid app switching), “Relapse” (quick return).
  • Statistical Nudges: “Category Dominance”, “Weekend Pattern”.

Data Engineering & Transformation

From a data perspective, this module is the “Static Catalog” in a larger system.
  • Source: Hardcoded static objects. In a more complex implementation, these might be fetched from a remote config service (like Firebase Remote Config) to update nudge text without an app update.
  • Transformation: The UI layer typically maps this list into a within a .
  • Resource Mapping: It uses standard Android R.drawable references, ensuring that the UI layer can directly consume the iconRes without further translation.

Dependencies

  • Android Framework: Relies on in.scrollless.android.R for resource management.
  • UI Layer: This model is consumed by the Compose/XML screens responsible for displaying nudge settings or active alerts.
Last modified on January 22, 2026