Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › BackgroundMusic Issue

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #8362

    Nour

    Hi

    I am using BackgroundMusic  to play game music, the music not stop playing when locking the mobile

    Code:

     

    BackgroundMusic{
    id:backgroundMusic
    source:"intro23.mp3"
    autoPauseInBackground:true
    }

    Please advice

    Thanks

    #8363

    Christian
    Felgo Team

    Hi,

    I guess you are experiencing this on Android?

    Is it happening on all devices you have tested it on?

    Cheers, Chris

    #8364

    Nour

    Yes for all

    #8387

    Christian
    Felgo Team

    Hi,

    we did test it on all Android devices we had, and could not reproduce the problem – the sound file was successfully paused when the lock button was pressed and then continued when the app was resumed again.

    Can you please try the AudioTest from the Felgo example folder: <QtSDK>/examples/Felgo/examples/multimedia/audio

    Maybe it has something to do with your mp3 file or the code you are using. If the AudioTest also does not work, please send us your project and the affected devices and we’ll have a closer look.

    Cheers, Chris

    #8410

    Alex
    Felgo Team

    Hi,

    thank you for the project files you sent via email. We could initially reproduce the problem and were also able to fix it. We found a faulty configuration in the AndroidManifest.xml file:

    All Qt-related projects usually include the line:

    <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14" />

    (so our wizards do). In your project configuration you’re missing the “targetSdkVersion” attribute, Android then uses the provided min sdk version number, which results in API 9 for your project. This version is missing the required application state handlers and therefore the background music resumed playback.

    Please make sure to define a target sdk version of 14 or higher and test it again.

    Cheers,

    Alex

    #8411

    Nour

    Thanks for helping

    its working now 🙂

     

    Thanks

Viewing 6 posts - 1 through 6 (of 6 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded