Skip to content
All work

Limitz

Android telemetry through Kotlin platform channels, entirely offline.

Role
Mobile Systems Engineer
Platforms
Android
Year
2025
Overview: mobile and Wi-Fi data, screen time, unlocks, all on-device
App Usage: per-app bandwidth and screen time, read straight from Android
App Limits: per-app daily caps, enforced after the limit is hit
Session planning: committing to a block of time before it starts
Settings: data plan thresholds and warning triggers, all local

A digital wellbeing and data monitor whose interesting half is not the Flutter UI but the Kotlin underneath it.

Flutter cannot see any of this on its own, so the app reaches through platform channels into Android system internals directly: per-SIM and Wi-Fi byte accounting via TrafficStats, screen time computed by walking raw UsageEvents, unlock counts, and the special-permission dance that PACKAGE_USAGE_STATS requires before any of it is readable. Every byte stays on the device. No analytics, no backend, no telemetry leaving the phone.

0
network requests, fully offline
Per-SIM
byte-level accounting
Kotlin
native Android beneath Flutter
  • Flutter
  • Kotlin
  • Platform Channels
  • UsageStatsManager
  • TrafficStats
  • Drift

The app, screen by screen.

  1. Overview: mobile and Wi-Fi data, screen time, unlocks, all on-device

    01 Overview

    Mobile and Wi-Fi data, screen time, unlocks, all on-device

  2. App Usage: per-app bandwidth and screen time, read straight from Android

    02 App Usage

    Per-app bandwidth and screen time, read straight from Android

  3. App Limits: per-app daily caps, enforced after the limit is hit

    03 App Limits

    Per-app daily caps, enforced after the limit is hit

  4. Session planning: committing to a block of time before it starts

    04 Session planning

    Committing to a block of time before it starts

  5. Settings: data plan thresholds and warning triggers, all local

    05 Settings

    Data plan thresholds and warning triggers, all local

How it was built.

Screen time from event deltas, not poll timers

Problem
Polling for screen state is inaccurate. It drifts, misses short sessions entirely, and costs battery to run continuously.
Approach
Kotlin walking the raw UsageEvents stream and pairing consecutive SCREEN_INTERACTIVE and SCREEN_NON_INTERACTIVE timestamps to compute exact millisecond durations after the fact.
Trade-off
Precise screen time with no background polling. The OS already recorded the events, so they only needed reading correctly.

Offline as a feature, not a limitation

Problem
An app that reads every app you open, how long you use it and how much data you consume is an extraordinary surveillance surface if any of it leaves the device.
Approach
Drift SQLite with code-generated queries and reactive streams as the only persistence. No backend exists to send data to.
Trade-off
A privacy guarantee that is structural rather than promised, and reactive streams that re-render the UI as the native service writes new records.