A Capacitor plugin to prevent mobile and web devices from dimming or locking the screen.
Keep Awake is a Capacitor plugin that prevents mobile and web devices from dimming or locking the screen. It provides a simple JavaScript API to programmatically control screen sleep behavior, solving the problem of interrupted user experiences during activities like video playback or presentations. The plugin works across iOS, Android, and web platforms through Capacitor's unified bridge.
Mobile developers building hybrid apps with Capacitor or Ionic who need to manage screen timeout behavior for specific app functionalities.
Developers choose Keep Awake for its dead-simple API, cross-platform consistency, and community-maintained reliability as part of the Capacitor ecosystem, eliminating the need to write platform-specific wake lock code.
⚡️ Capacitor plugin to prevent devices from dimming or locking the screen.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides straightforward async methods like keepAwake() and allowSleep(), abstracting platform differences for easy implementation without complex code.
Works on iOS, Android, and web through Capacitor, with isSupported() method to detect availability, ensuring reliable behavior across devices.
From the README, installation only requires npm install and npx cap sync, with no additional configuration needed for basic use.
Includes isKeptAwake() to query current status, enabling developers to manage wake states programmatically and avoid conflicts.
Only usable within Capacitor or Ionic projects, making it unsuitable for non-Capacitor frameworks like React Native or Flutter.
Focuses solely on basic wake locks; lacks advanced controls such as screen brightness adjustment or background wake states, which may be needed for complex apps.
As a community plugin, it may have slower updates or less official support compared to core Capacitor plugins, though it is actively maintained per the badges.