Skip to main content

Appear On Top (System Overlay)

The Appear On Top permission (known natively as the SYSTEM_ALERT_WINDOW or System Overlay permission) is critical to CommitT’s digital enforcement engine. It allows the background blocker thread to render an interactive, un-skippable blocking screen when a user attempts to launch a restricted app.

Why it is Required

When a restricted app (like Instagram) is opened:
  1. The Accessibility Service detects the app launch.
  2. The service queries the local SQLite engine for active block rules.
  3. If active, the overlay window is spawned immediately using WindowManager.
  4. The overlay intercepts touch events, rendering the CommitT blocking UI.

Native Implementation

The permission is checked using the system’s Settings.canDrawOverlays API on Android Marshmallow (API 23) and above:

Requesting the Permission

To request this permission, the native module triggers a targeted system intent directly to the drawing settings page for CommitT, saving the user from searching through system settings menus: