Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt Android run main thread while sleep
QtWS25 Last Chance

Qt Android run main thread while sleep

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 782 Views
  • 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.
  • M Offline
    M Offline
    MrBlond
    wrote on last edited by
    #1

    Hello,

    I develop an application with a gui and network-connection. Network-connection runs in its own thread and polls continuously. If there are new data network-connection emits a signal and gui catches it. This works perfect.

    Polling should be also enabled when user pushs power-button of Android device. I use PARTIAL_WAKE_LOCK to prevent device from sleeping (http://stackoverflow.com/questions/34179653/how-do-i-prevent-an-android-device-from-going-to-sleep-from-qt-application). PARTIAL_WAKE_LOCK ist called by gui and network thread.

    Polling is working and emits signals. But main thread isn't catching these signals. When I switch my device on it's like frozen for some time because all emiting signals are caught and processed now by gui. After catching all signals gui is working normal.

    It is possible that gui thread catches signals while device is off? How can I realize this? Is there another option to reach this behavior application is processing in background like in foreground? (User should have option to switch device off.)

    Thanks a lot for your support!

    system: Qt:5.5.1

    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