[SOLVED]Capturing application sleep/wake in Qt
-
My iOS application runs on an iPad and communicates via TCP/IP to an external server. When the user locks the iPad using the home key or through timeout, I lose my socket connection. My questions are:
- Can I trap this event to properly suspend my processing?
- Can I received notification of waking to try and re-establish communication?
I could get by with just a signal saying that we've just woken up. Then I could check for my connection status and initiate a connection if none is present.
-
Hi @DRoscoe,
Have a look at applicationState. Connect to applicationStateChanged signal to get notified about the changes. -
@p3c0 Thank you! That did the trick!