|
|
@ -74,10 +74,10 @@ function initCordova() {
|
|
|
|
|
|
|
|
|
|
|
|
document.addEventListener("deviceready", function () {
|
|
|
|
document.addEventListener("deviceready", function () {
|
|
|
|
if (localStorage.getItem("wakelock") == "true") {
|
|
|
|
if (localStorage.getItem("wakelock") == "true") {
|
|
|
|
window.powerManagement.dim(function () {
|
|
|
|
window.powerManagement.acquire(function () {
|
|
|
|
console.log('Partial wakelock acquired');
|
|
|
|
console.log('Wakelock acquired');
|
|
|
|
}, function () {
|
|
|
|
}, function () {
|
|
|
|
console.log('Failed to acquire partial wakelock');
|
|
|
|
console.log('Failed to acquire wakelock');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
window.powerManagement.release(function () {
|
|
|
|
window.powerManagement.release(function () {
|
|
|
|