Software Archive
Read-only legacy content

Block Standby

Dani_Carla
Beginner
402 Views

Hi ....

How do I not allow the phone from standby mode while my app is in use

0 Kudos
4 Replies
Dani_Carla
Beginner
402 Views

Sorry, but I do not know how to use

I'm trying this
 

<script>
	intel.xdk.device.managePower(true,false);
</script>

But.. dont work

0 Kudos
John_H_Intel2
Employee
402 Views

Did you include the Intel Device plugin in the plugins included in the app?

0 Kudos
Anusha_M_Intel1
Employee
402 Views

So you don't want the device to go to sleep when using the app? Try to stay away from the intel.xdk plugins unless you cannot find an alternative. Those are no longer maintained. There is a popular plugin by Eddy Verbruggen - https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin

To prevent sleeping - window.pluginsinsomnia.keepAwake();

To allow sleeping again - window.plugins.insomnia.allowSleepAgain();

0 Kudos
Reply