Closed alvaro562003 closed 7 years ago
When i call awake juste after the device ready event, insomnia work well. But when called after the photo gallery, insomnia does not work. The photo gallery i use is imagepicker: https://github.com/wymsee/cordova-imagePicker
seems to be similar to https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin/issues/29
@alvaro562003 you're right, good catch
Hi Eddy, Hope you are fine.
I follow the instructions written there: https://www.npmjs.com/package/cordova-plugin-insomnia 1) cordova plugin add https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin.git 2) cordova prepare
Then in index.js i wrote :
if (window.plugins.insomnia && window.plugins.insomnia.keepAwake) { window.plugins.insomnia.keepAwake(onSuccess,onError); } else { alert("insomnia plugin missing"); }
onSuccess is correctly invoked and executed. So i assumed the installation is correct.
But the screen of my SamSung Galaxy XCover 3 running on Android 5.1.1 sleeps after few seconds. Cordova 6.3.1
Do you have an idea of what's wrong ?
Thanks