App usage record? #3

Open
opened 2026-07-13 08:46:57 +00:00 by alberto · 2 comments
Owner
No description provided.
Author
Owner

Measure time spend on apps?

Measure time spend on apps?
Author
Owner
  1. Timestamp diff at the launcher boundary — since IchWillHeim is the locked-down home app, record a timestamp when open_app fires, then again when MainActivity.onResume() fires (user is back at the launcher, either by pressing home or the app closing). The diff is "time spent in app." No new permission needed, and it reuses the exact same event_log/duration_seconds fields you already have for workflows.
  2. UsageStatsManager — Android's real foreground-time API per package. More accurate (doesn't get confused if the phone sits idle in the other app), but requires the caregiver to manually grant "Usage Access" once via a special Settings screen (not a normal permission dialog).
1. Timestamp diff at the launcher boundary — since IchWillHeim is the locked-down home app, record a timestamp when open_app fires, then again when MainActivity.onResume() fires (user is back at the launcher, either by pressing home or the app closing). The diff is "time spent in app." No new permission needed, and it reuses the exact same event_log/duration_seconds fields you already have for workflows. 2. UsageStatsManager — Android's real foreground-time API per package. More accurate (doesn't get confused if the phone sits idle in the other app), but requires the caregiver to manually grant "Usage Access" once via a special Settings screen (not a normal permission dialog).
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alberto/IchWillHeim#3