Forums

OverviewFelgo 2 Support (Qt 5) › How to make apps runnable in background :Android:

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #18771

    sandeep kumar mishra

    I am making a music player app. All logics are perfect but when user press the back button app closes immediately and music stops.
    I want that if music is playing then app will run in background otherwise not.
    I can check whether the music is playing or not but unable to make app runnable in background.

    #18793

    sandeep kumar mishra

    Anyone here…??

    #18795

    Marcin

    Hi,
    I am not an expert in this topic but looks like really Qt specific.
    Probably it depends on the platform and can look differently for Android/iOS.
    Quick googling shows that, at least for Android, it is supported since Qt 5.7 so should be fine.
    More info:
    Native implementation: https://developer.android.com/guide/components/services.html
    Qt bridge: https://doc.qt.io/qt-5/androidservices.html

    For iOS would check how it is natively implemented and check if adequate “bridge” is implement in Qt.
    Also searching some Qt docs for iOS could show solution.

    [EDIT]
    Looks like for iOS one of the options is to use ObjectiveC from C++ etc, some topic on the forums:
    https://forum.qt.io/topic/60597/ios-backgrounding-suspend-inactive/12
    Some official iOS docs: https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html

    #18797

    sandeep kumar mishra

    Thanks for your help…..

    #18798

    Günther
    Felgo Team

    Hi all,

    as Marcin’s solutions suggest, adding features that run in the background is a task that highly depends on the target platform (iOS, Android).
    There’s no ready-to-use implementation for background-running components with Felgo. It is required to rely on Qt C++ or native code parts for Android (Java) or iOS (Obj-C).

    Best,
    Günther from Felgo

     

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

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support