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. [SOLVED]Capturing application sleep/wake in Qt
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]Capturing application sleep/wake in Qt

Scheduled Pinned Locked Moved Mobile and Embedded
ios
3 Posts 2 Posters 1.8k Views 3 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.
  • D Offline
    D Offline
    DRoscoe
    wrote on last edited by DRoscoe
    #1

    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.

    p3c0P 1 Reply Last reply
    0
    • D 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.

      p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

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

      157

      D 1 Reply Last reply
      1
      • p3c0P p3c0

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

        D Offline
        D Offline
        DRoscoe
        wrote on last edited by
        #3

        @p3c0 Thank you! That did the trick!

        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