Skip to main content

Summary

The Usage Limits Management feature serves as the central dashboard for users to control their screen time. It allows users to set daily time allowances for individual apps or group multiple apps together (e.g., “Social Media” or “Games”) under a shared timer. The feature also includes smart “Coach” suggestions that analyze past behavior to recommend realistic limit reductions, helping users gradually improve their digital wellbeing.

How It Works

This feature orchestrates the interaction between user input, historical usage data, and the background enforcement system.
1

Dashboard Aggregation

When the user opens the Limits screen, the system aggregates data from multiple sources. It fetches currently active limits, retrieves app usage statistics for the current day and the past week, and checks the installation status of apps. This data is combined to show progress bars indicating how much time is left for each group.
2

Smart Suggestions

Simultaneously, the system analyzes the user’s usage history. It identifies apps or categories (like “Social” or “Gaming”) that consume the most time and generates “Quick Action” cards. These cards suggest creating new limit groups with calculated time goals based on the user’s actual average usage.
3

Creation and Conflict Resolution

When a user creates a new group, they select specific apps. The system checks if any of selected apps are already part of another limit group. If a conflict is found, the user is presented with a resolution UI where they can choose to “Move” the app to the new group or “Keep” it in the old one.
4

Saving and Enforcement

Once the user saves a group (defining the name, emoji, and time limit), the configuration is written to the database. The system immediately notifies the background LimitMonitor service. This service recalculates the remaining time for the day and begins enforcing the new rules immediately.

Data Stored

The feature manages complex relationships between groups and apps.
FieldTypeDescription
group_idLongUnique identifier for the limit group
nameStringUser-defined name (often includes an emoji prefix)
time_limit_minutesIntegerThe daily allowance in minutes
appsListList of package names included in this group
is_enabledBooleanWhether the limit is currently active
paused_untilTimestampIf paused, the time when the limit will automatically resume
pause_reasonStringThe user-selected reason for pausing the limit

Key Components

Limits Screen

The main dashboard displaying active limits, progress bars, and smart suggestions.

Limits ViewModel

Handles business logic, including calculating remaining time, generating suggestions, and resolving app conflicts.

Coach Engine

Analyzes success/failure rates of previous days to suggest tighter limits or “Easy Goals.”

Conflict Resolver

A UI mechanism that prevents an app from belonging to two different limit groups simultaneously.
Last modified on January 25, 2026