Summary
The Notification Postbox allows users to regain focus by intercepting notifications from distracting apps and delivering them in batches at scheduled times. Instead of receiving constant interruptions throughout the day, the user receives a single summary notification at their chosen times (e.g., 8:00 AM, 12:00 PM, 6:00 PM). Users can then enter a dedicated “Postbox” interface to review, dismiss, or open these notifications one by one.How It Works
The feature works by separating the configuration (selecting apps and times) from the review experience (the Postbox interface).Configuration
In the Insights screen, the user enables “Notification Batching.” They select which apps to batch (e.g., Instagram, Gmail) and set specific delivery times. The app saves these preferences in the Settings Repository.
Interception and Storage
When a notification arrives from a selected app, the system intercepts it. Instead of buzzing the phone immediately, the notification is saved to the local database with a flag indicating it is “batched” and currently undelivered.
Scheduled Delivery
At the scheduled time (e.g., 6:00 PM), the system checks the database. If there are pending notifications, it alerts the user that their “Postbox is ready.”
Reviewing the Postbox
The user opens the Postbox Activity. This screen first shows an overview (a visual map of apps with pending items). When the user taps an app, they enter a focused review mode.
Data Stored
The feature relies on storing notification metadata locally to display them later without keeping the original system notification active.| Field | Type | Description |
|---|---|---|
| notificationKey | String | Unique system key to identify the notification |
| packageName | String | The ID of the app that sent the notification (e.g., com.whatsapp) |
| postTimeUTC | Long | The timestamp when the notification originally arrived |
| title | String | The bold header text of the notification |
| text | String | The body content of the notification |
| isBatched | Boolean | Flag indicating this item was intercepted for the Postbox |
| state | Integer | Status tracker (0=Posted, 1=Dismissed, 2=Clicked, 4=Seen) |
Key Components
PostBoxActivity
The dedicated full-screen UI where users swipe through their batched notifications card-by-card.
PostBoxViewModel
Manages the queue of undelivered notifications and handles the logic for opening the original app content.
NotificationInsightsScreen
The settings interface where users toggle batching, select apps, and configure delivery schedules.
NotificationListener
A background service (referenced by the ViewModel) that physically intercepts the incoming system notifications.