Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Block Standby

Dani_Carla
Beginner
813 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
813 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
813 Views

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

0 Kudos
Anusha_M_Intel1
Employee
813 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