Accessibility Service
CommitT requires the Accessibility Service permission to power its digital blocklists. By registering a dedicated accessibility background service, CommitT can intercept app launches, monitor window switches, and prevent self-sabotage in real-time.Why it is Required
Modern Android privacy restrictions prevent background applications from querying which app is currently running in the foreground.- The Limitation: Standard APIs like
getRunningTasks()or UsageStats Manager have high latency and can be bypassed. - The Accessibility Solution: Registering a custom
AccessibilityServiceallows CommitT to receive immediate event callbacks (TYPE_WINDOW_STATE_CHANGED) whenever a user switches apps. If the user attempts to launch a blocklisted application (e.g., Instagram), the service immediately intercepts the navigation and triggers the full-screen blocking overlay.
Native Implementation
The native module audits the status by checking the secure system settings database to see ifBlockerAccessibilityService is active:
Requesting the Permission
To request the permission, CommitT directs the user directly to the Android System Accessibility settings list:Due to Android security sandbox restrictions, the user must scroll to “Installed Services” (or “Downloaded Apps”), select CommitT Blocker Service, and toggle the switch to On.