In Intel XDK I added the Insomnia plugin to prevent the screen from sleeping during game play. In the instructions it says:
"The device will never fall asleep after calling keepAwake."
".....you can allow it to sleep again by calling allowSleepAgain."
My question is how do I call keepAwake and allowSleepAgain?
To me it seems like it will have to be an event in Construct 2. Otherwise the plugin won't know when to keep awake or to allow sleep. I plan on adding a counter that will reset every time the screen is touched. If the counter gets to a certain number it will be allowed to sleep.
I am wanting to know how do I use Handles for plugins, or I need to be pointed into the proper direction if I am going about it wrong.
I am also wanting to know if Caps matter when calling the plugin's handles.
As in will using KeepAwake instead of keepAwake make the plugin not work, or will depend on the plugin?