Skip to main content

Battery Optimization Bypass

Android’s default power management subsystem features aggressive background restrictions (such as Doze Mode and App Standby). For a self-improvement and enforcement app like CommitT, continuous background activity is essential to schedule alarms, monitor location geofences, and process synchronization loops. Bypassing battery optimization ensures CommitT remains active, online, and persistent.

Why Whitelisting is Mandatory

By default, the operating system limits background processes in several ways:
  • GPS Stream Throttle: Background location updates are restricted to once every few hours.
  • Alarms & Tasks Coalescing: Custom alarm schedules are deferred to save power.
  • Sync Throttling: Network synchronizations are grouped and delayed.
When CommitT is whitelisted (ignoring battery optimizations), these restrictions are waived:
  1. Continuous 1Hz GPS: High-frequency GPS updates are allowed for precise geofencing checks.
  2. Immediate Alarm Dispatch: Exact check-in alarms sound instantly without scheduling drift.
  3. Real-Time Cloud Sync: Sync events with the Convex backend execute immediately.

Native Implementation

The application checks optimization status using PowerManager.isIgnoringBatteryOptimizations:

Deep-Linking to System Whitelist

The native module directs users directly to the system-level battery settings, where they can search and toggle CommitT to “Don’t Optimize”:
Android security policies restrict applications from bypassing this screen programmatically. The user must manually select “All Apps” in the dropdown and check CommitT to complete the whitelist configuration.