Sleep Control

Allows enabling or disabling device sleep.
nleclerc0.1.00
platforms: ios
$ cordova plugin add fr.spirotron.cordova.sleepcontrol

cordova-plugin-sleepcontrol

Description

This plugin makes it easy to enable or disable device sleep.

Note: Works for iOS ONLY for the time being.

iOS

The plugin sets the idleTimerDisabled property of the application.

Usage

To disable sleep, just call SleepControl.setEnabled(false);.

To enable sleep again, call SleepControl.setEnabled(true);

License

This code is released under the Apache 2.0 license.