This question is locked. New answers and comments are not allowed.
Hi,
I downloaded the latest version of PowerManagement Plugin from here (https://github.com/Viras-/cordova-plugin-powermanagement)
I imported it into the AppBuilder and according to AppBuilder documentation since the plugin.xml uses js-modules i dont need to declare it in the index.html.
However, i can figure out how to use it i tried this to no avail when i run this on the device. Please help
I downloaded the latest version of PowerManagement Plugin from here (https://github.com/Viras-/cordova-plugin-powermanagement)
I imported it into the AppBuilder and according to AppBuilder documentation since the plugin.xml uses js-modules i dont need to declare it in the index.html.
However, i can figure out how to use it i tried this to no avail when i run this on the device. Please help
cordova.require(
'cordova/plugin/powermanagement'
).acquire(
function
() { alert(
'successfully acquired full wake lock'
); },
function
() { alert(
'error acquiring full wake lock'
); }
);