Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    [SOLVED]Capturing application sleep/wake in Qt

    Mobile and Embedded
    ios
    2
    3
    1455
    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.
    • D
      DRoscoe last edited by DRoscoe

      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:

      1. Can I trap this event to properly suspend my processing?
      2. 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.

      p3c0 1 Reply Last reply Reply Quote 0
      • p3c0
        p3c0 Moderators @DRoscoe last edited by

        Hi @DRoscoe,
        Have a look at applicationState. Connect to applicationStateChanged signal to get notified about the changes.

        157

        D 1 Reply Last reply Reply Quote 1
        • D
          DRoscoe @p3c0 last edited by

          @p3c0 Thank you! That did the trick!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post