I'm programming an Android application, and I would like to do so that it doesn't shut down the screen, ever.Pretty much like a car gps app that keeps the screen on.
Would someone know how to do this with phonegap ?
If its not possible in Javascript, is there an easy way to do it in Java but inside the main Phonegap function ?
Thank you
use this property in the ManiFestFile
<uses-permission android:name="android.permission.WAKE_LOCK"/>
and add this in the required Activity
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With