Where to download original cordova plugin for PowerManagement, and how to install it? I am referring to this class org.apache.cordova.plugin.PowerManagement Thanks!
Asked
Active
Viewed 1,299 times
2 Answers
1
This is not official Cordova plugin
You could install in by using following command:
cordova plugin add https://github.com/Viras-/cordova-plugin-powermanagement.git
Gihub for the plugin: https://github.com/Viras-/cordova-plugin-powermanagement

codevision
- 5,165
- 38
- 50
-
the not official one is having class org.apache.cordova.powermanagement.PowerManagement , does the other without "powermanagement" namespace mentioned here http://stackoverflow.com/questions/17250808/plugin-phonegap-power-management exist? – iwan Aug 10 '14 at 23:43
-
Namespace was changed in this commit. https://github.com/Viras-/cordova-plugin-powermanagement/commit/8b0c68770ff01af341710713aeaa57aa8d635fac No other change happens. – codevision Aug 11 '14 at 07:38
1
You can use this one (not offical Cordova plugin, but referenced on cordova plugins site)
http://plugins.cordova.io/#/package/org.chromium.power
and it support android and ios.
Use the requestKeepAwake API to keep power on :
chrome.power.requestKeepAwake('display');
Then use the releaseKeepAwake API to turn off :
chrome.power.releaseKeepAwake();

Geoffrey Lalloué
- 1,456
- 1
- 20
- 43