I have an android application of slideshow which is developed in qt. The device after some time, gets the screen dim, and goes off and locked. How can I avoid this, until user quits the application.
Like similar to “android.permission.WAKE_LOCK” and call some functions.. I’m not sure exactly.
You need to execute this piece of java code:
To do so, add this file to your project:
WakeLock.java:
Then, from your app, just execute the code:
There might be a way to do this without the java file. I'm working on it: Unable to call PowerManager.WakeLock.newWakeLock using QAndroidJniObject