1.0.1 • Published 4 years ago

@nunosav/no-sleep v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@nunosav/no-sleep

Capacitor 3 plugin to keep mobile device awake. Based on https://github.com/capacitor-community/keep-awake but with Capacitor 3 support.

Install

npm install @nunosav/no-sleep
npx cap sync

API

stayAwake()

stayAwake() => Promise<void>

Keep mobile device screen on, preventing idle shutdown.


sleep()

sleep() => Promise<void>

Allow the mobile device screen to go idle.