• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

(Solved) How to keep the display on

Scheduled Pinned Locked Moved App Development
6 Posts 3 Posters 517 Views 1 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jes
      last edited by jes 9 Jan 2019, 10:11 31 Aug 2019, 10:09

      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.

      1 Reply Last reply Reply Quote 0
      • T Offline
        TotalSonic
        last edited by 31 Aug 2019, 19:22

        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

        J 1 Reply Last reply 1 Sept 2019, 06:58 Reply Quote 0
        • N Offline
          normandc
          last edited by 31 Aug 2019, 20:47

          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.

          https://code.launchpad.net/~mpredotka/night-clock/trunk

          J 1 Reply Last reply 1 Sept 2019, 07:00 Reply Quote 0
          • J Offline
            jes @TotalSonic
            last edited by 1 Sept 2019, 06:58

            @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.

            1 Reply Last reply Reply Quote 0
            • J Offline
              jes @normandc
              last edited by 1 Sept 2019, 07:00

              @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 🙂

              1 Reply Last reply Reply Quote 0
              • J Offline
                jes
                last edited by 1 Sept 2019, 10:11

                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

                1 Reply Last reply Reply Quote 2
                2 out of 6
                • First post
                  2/6
                  Last post