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. Qt5 running in the background on Android
Forum Updated to NodeBB v4.3 + New Features

Qt5 running in the background on Android

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 850 Views 3 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.
  • T Offline
    T Offline
    tuanster
    wrote on last edited by
    #1

    As you know, by default Qt5 application doesn't run when it's in the background on Android because the Qt main thread is blocked. Any background processing is on hold until your Qt5 application goes to the foreground.
    In the AndroidManifest.xml, by modifying
    <meta-data android:name="android.app.background_running" android:value="true"/>
    it will allow it to run in the background but at times it results in crashes since the application still tries to draw after receiving Qt::ApplicationSuspended() signal.
    I would like my application to be able to process and handle events while it's in the background but there's no clear way.
    Question:

    1. Will Digia try to fix this issue by allowing Qt application to run in the background? Maybe non-UI tasks to run in the background?
    2. If not, does anyone have a good design for this issue? Maybe 2 Qt applications? One running Qt application as a service and the other one as a normal Qt Quick application?

    Any help is appreciated.

    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