Reputation: 640
I want to make a tracking app using html5 + js, but i dont know how i can allow the gps location methods working with the device in stand by. To avoid this i want to keep the screen on.
Is there a way to keep the screen on using Intel XDK framework? I know that is impossible using PhoneGap.
Upvotes: 1
Views: 560
Reputation: 1
This is the API for keeping screen on:
AppMobi.device.managePower(true,false);
It should be called after the device ready event.
(false,false) sets the power management to act normal
(true, false) keeps screen on
(true, true) keeps screen on only when device is plugged in
Source: https://software.intel.com/en-us/node/493027
Upvotes: 0
Reputation: 521
The Intel XDK JavaScript Bridge API doesn't provide any capabilities that will allow you to keep the device's screen ON for your app.
There is actually a PhoneGap plugin that allows you to keep the screen ON while your application is running. You can find the plugin at https://github.com/MikeyAlder/PhoneGap-KeepScreenOn. You will have to build your app with PhoneGap Build since Intel XDK doesn't support custom PhoneGap plugins in the current version(v.876).
Upvotes: 2