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. detect when activity is currently visible or opened...

detect when activity is currently visible or opened...

Scheduled Pinned Locked Moved Solved Mobile and Embedded
2 Posts 2 Posters 326 Views 1 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.
  • 0xNull0 Offline
    0xNull0 Offline
    0xNull
    wrote on last edited by
    #1

    im building and app that play audio on device but had two plans. premium and regular, basically premium allow you listen music with app closed on background but i dont know how detect when app is closed or isn't visible, when you close app, this still playing audio on device... only found a way to detect when user press back button with this:

    Connections {
           target: Qt.application
    
           onAboutToQuit: {
              console.log("back_button_pressed");
               audioPlayer.stop()
           }
        }
    

    but if the user close the app with button to see apps running, the app still playing audio.

    so... is there a way to detect when app is closed or isn't visible, something that can help me detecting when user close the app.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      I think this thread has a fitting answer to your issue: https://forum.qt.io/topic/58483/solved-detect-when-app-is-sent-to-backround-on-android/2

      (Z(:^

      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