Skip to main content

Summary

The User Journeys feature transforms raw phone usage data into a readable, chronological story. Instead of just showing total screen time, it visualizes exactly how the user interacts with their device throughout the day. It groups actions into “Sessions” (unlocking the phone, using apps, and locking it again) and highlights “Gaps” (time spent off the phone), helping users understand their behavioral patterns and frequency of checking their device.

How It Works

The feature works by querying a database of events and stitching them together into a visual timeline.
1

Date Selection & Retrieval

When the user opens the screen, it defaults to the current date. The user can also select a past date using the calendar icon. The ViewModel requests all journey events for that specific day from the Repository.
2

Event Grouping

The app retrieves a raw list of events (like “Unlocked at 9:00 AM”, “Opened Instagram”, “Locked at 9:05 AM”). The screen logic processes this list to identify Sessions. A session is defined as the time between unlocking the phone and locking it again.
3

Gap Calculation

Between two sessions, the app calculates the time difference. If the time between locking the phone and unlocking it again is significant (more than 2 seconds), it is identified as a Gap. This represents “Time Off” the screen.
4

Visual Rendering

The screen draws a vertical timeline:
  • Sessions are connected by a solid vertical line.
  • Gaps are connected by a dotted vertical line.
  • App Usage is displayed as cards within the session, showing the app icon, name, duration, and even scroll distance (e.g., “5.2m scrolled”).

Data Stored

The feature relies on the UserJourney entity, which stores individual events that make up the timeline.
FieldTypeDescription
timestampLongThe exact time the event occurred (in milliseconds)
eventTypeStringThe type of action (Session Start, App Usage, Session End)
packageNameStringThe ID of the app being used (if applicable)
durationMsLongHow long the app was used
scrollDistancePxLongApproximate distance scrolled in pixels (converted to meters in UI)
triggerRefStringIf the session was started by a notification, this stores which app sent it

Key Components

JourneysScreen

The main interface that renders the vertical timeline, handles scrolling, and manages the “Scroll to Top” button.

JourneysViewModel

Manages the currently selected date and coordinates fetching data from the repository.

Timeline Processor

Logic within the screen that sorts raw events into “Sessions” and calculates the duration of “Gaps” between them.

Info Sheet

A helper screen that explains the terminology (Journey, Time Off, Timeline) to the user.
Last modified on January 25, 2026