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] QML Audio elements keeps playing even though the app on android goes in background
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] QML Audio elements keeps playing even though the app on android goes in background

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 867 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.
  • L Offline
    L Offline
    laithbasildotnetgmail.com
    wrote on last edited by
    #1

    Hi,

    I use Qt/QML to build an android app. but the problem i face is.. when the app goes to background the music is still playing for at least 30 sec.. and I have no idea how i should stop it. and return it when the app return active again.

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      I think you can use "Qt.application.state":http://doc.qt.io/qt-5/qml-qtqml-qt.html#application-prop for it. When the app goes in background the state will change.

      157

      1 Reply Last reply
      0
      • L Offline
        L Offline
        laithbasildotnetgmail.com
        wrote on last edited by
        #3

        Thank you, now its working !

        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