Overview
React Native Background Guardian is primarily designed for Android, where aggressive battery optimizations can kill background processes. On iOS, the library provides a safe no-op implementation that returns appropriate default values.API behavior comparison
Wake lock management
On Android, wake locks are reference-counted. Each
acquireWakeLock() call must be paired with a releaseWakeLock() call.Screen wake lock
Battery optimization
Power save mode
Power Save mode is different from battery optimization exemptions. An app can be exempt from Doze mode but still be affected by Power Save mode restrictions.
Device idle mode (Doze)
OEM-specific settings
When to use each API
Background audio/video playback
- Android
- iOS
Foreground-only screen keep-awake
- Android
- iOS
Both platforms support screen wake locks with the same API. This is one of the few methods that has meaningful behavior on both platforms.
Background location tracking
- Android
- iOS

