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. Play sound while android turn off screen

Play sound while android turn off screen

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 491 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.
  • A Offline
    A Offline
    amsantosr
    wrote on last edited by
    #1

    Hello,
    I am developing a music player application that reads files and plays sound using QAudioSink. It works on Windows but if I play on Android and the phone sleeps the application is paused. How do I play sound while android is on sleep mode?

    Thanks in advance.

    jsulmJ 1 Reply Last reply
    0
    • A amsantosr

      Hello,
      I am developing a music player application that reads files and plays sound using QAudioSink. It works on Windows but if I play on Android and the phone sleeps the application is paused. How do I play sound while android is on sleep mode?

      Thanks in advance.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @amsantosr I'm not an Android expert, but if something needs to run when application is not in foreground you need a background service.
      https://developer.android.com/training/run-background-service/create-service

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      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