Software Archive
Read-only legacy content

Block Standby

Dani_Carla
Principiante
741Visualizzazioni

Hi ....

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

0 Kudos
4 Risposte
Amrita_C_Intel
Dipendente
741Visualizzazioni
Dani_Carla
Principiante
741Visualizzazioni

Sorry, but I do not know how to use

I'm trying this
 

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

But.. dont work

John_H_Intel2
Dipendente
741Visualizzazioni

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

Anusha_M_Intel1
Dipendente
741Visualizzazioni

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();

Rispondere