WebSnag
A local-first Android focus app that combines NFC locks, recurring schedules, allowlist profiles, and deliberate unlock friction to make distractions harder to reach.
Kotlin · Jetpack Compose · NFC · AccessibilityService · DataStore
Loading…
A local-first Android focus app that combines NFC locks, recurring schedules, allowlist profiles, and deliberate unlock friction to make distractions harder to reach.
Kotlin · Jetpack Compose · NFC · AccessibilityService · DataStore
WebSnag screenshot photo 1 of 4

Make clear-headed decisions about distracting apps enforceable later on an ordinary Android phone, without requiring a cloud account, telemetry, dedicated hardware, or device-owner privileges.
A Jetpack Compose app for focus sessions, recurring schedules, blocklist and allowlist profiles, activity history, NFC enrollment, setup, and blocking feedback.
A local persistence and domain layer for profiles, schedules, NFC tags, focus-session history, unlock conditions, and reactive enforcement state.
An event-driven enforcement path that checks foreground packages, returns blocked launches to the home screen, and opens a focused blocker overlay.
Compose screens persist profiles and enrolled tags locally. A scanned tag resolves to a profile transition, the enforcement engine caches the active rule set, and the Accessibility Service sends blocked launches to the overlay.
Dashboard, profile, tag, setup, and overlay surfaces read and update locally persisted domain state through Flow-backed repositories.
Tag taps resolve activation and release actions, while recurring schedules evaluate time windows and coordinate automatic profile transitions.
The engine observes the active profile and maintains a constant-time package cache, filter mode, timer state, exemptions, and interception count.
Window-state events are checked without polling; blocked launches return home and open the Compose overlay with current focus context.
Profiles, tags, activity, and enforcement state stay on-device, with no backend, account, telemetry, or network dependency in the enforcement loop.
The Accessibility Service listens for foreground window changes and delegates package decisions to an in-memory cache, reducing latency and battery work.
The app pairs tag-based unlocking with a timed emergency path and intention phrase so users cannot be permanently stranded but must pause before bypassing a session.
Unit tests cover activation, deactivation, blocklist checks, allowlist checks, system exemptions, blocked-attempt recording, session timing, and emergency cooldown completion.
Tests cover tag-based activation and release plus schedule formatting, same-day and overnight windows, Wi-Fi conditions, disabled routines, and overlap detection.
The repository defines JDK 17, Android API 26 minimum support, Gradle test and debug APK commands, and separate local and instrumented test dependencies.
Public repository snapshot reviewed at commit db40858 implements NFC and scheduled profile activation, blocklist and allowlist enforcement, remote hold-to-lock activation, session history, theme controls, setup, blocker feedback, and emergency unlock friction.
Documents the current NFC, schedules, filtering, activity, themes, screenshots, and Android requirements.
Shows active-profile observation, package caches, blocklist and allowlist decisions, system exemptions, session records, and emergency cooldown behavior.
Shows periodic schedule evaluation, automatic profile activation, and deactivation when an automatically started window ends.
Covers enforcement, NFC resolution, schedule windows, Wi-Fi conditions, overlap detection, and activity summaries.