Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to keep screen OR use Wake lock feature in a Qt Quick and QML application for Android using Qt 6?
Forum Updated to NodeBB v4.3 + New Features

How to keep screen OR use Wake lock feature in a Qt Quick and QML application for Android using Qt 6?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qt6.3.1qml androidandroid library
1 Posts 1 Posters 545 Views 1 Watching
  • 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.
  • K Offline
    K Offline
    Kokoy
    wrote on last edited by
    #1

    As the question is stating, I have a QT Quick application where I use QML for both the QUI and Backend. Now my application is quite straightforward and contains a timer that needs to keep counting down so I wanted to keep the screen on while the app is running.

    One solution is to use the android Wake Lock feature that keeps the app running if the screen is turned off. But the issue is that when I looked this up for Qt I found that the library called "Qt Android Extras" is available up until Qt 5+ but not Qt 6. Unless I'm wrong which is why I'm asking for details.

    The reason being the timer pauses if the screen turns off and the timing is critical, thus it needs to keep counting no matter what.

    This is my first Android app using Qt so I'm not familiar with what I should be doing, so what should I do or what am I missing?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved