Qt Android run main thread while sleep
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!