(Solved) How to keep the display on
-
I've created an HTML app using clickable.
I've added the "keep-display-on" policy group to the apparmor file.
But when I run it on the phone, the display still turns off after 1 minute.
What is the correct way to keep the display from turning off?
Cheers.
The app is at https://github.com/jes/ubuntutouch-chessclock/ if it helps.
-
One method is to install the "Active Screen" app from the Open Store and enable it whenever you wish to keep the dislay on for other apps.
Best regards,
Steve Berson -
I've installed Night Clock from the OpenStore (currently down) which keeps the display on. It seems to be programmed in QML so I'm not sure if it's relevant, but you could have a look at its code.
-
@TotalSonic Thanks, this would work for me, but I'd like to be able to distribute it in the OpenStore and have it work automatically for everyone else.
-
@normandc Thank you, from looking through it all, I assume you have to include the "ScreenSaver" control in the QML in order to keep the screen. So maybe my app has to become a QML app
-
I figured out what to do by combining bits of code I found in various other projects (the night clock and active screen projects mentioned above, and the qtwebengine-demo from gitlab).
Here's the commit that turned my webapp into a QML app that keeps the screen on, in case it's useful to anyone else: https://github.com/jes/ubuntutouch-chessclock/commit/4b21852da96b4ecf3f8c9af12eeff48d85cb7e77