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. Trouble keeping an application running in the background
Forum Update on Monday, May 27th 2025

Trouble keeping an application running in the background

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
ndkandroid
1 Posts 1 Posters 312 Views
  • 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.
  • O Offline
    O Offline
    ouscn
    wrote on 6 Nov 2020, 14:38 last edited by ouscn 11 Jun 2020, 14:39
    #1

    Hello, I am trying to make an app that runs even when it is not in the foreground. My host machine is Windows 64-bit and target is Android 9 mobile phone.

    What I am expecting:
    Application needs to run some algorithms that needs real-time operation without any performance limits. Also it should also let an another app be active.

    What happens:
    Application terminates after some other application stays active and/or receives user input. No errors thrown. No set time to make this happen. Not always happens. Seems I cannot escape Android optimization.

    What I tried:
    -Modified my AndroidManifest.xml as follows:
    <meta-data android:name="android.app.background_running" android:value="true"/>

    I keep track of the application state and do not update any windows when it is not active

    -Disabled battery optimization for my app

    -Tried to increase background app limit(4 was the maximum default was "standard")

    Documentation states that background services have some limitations regarding system resources. Is there a way to make this work with current configuration or do I have to try to convert this to a service? I need to use hotspot, Bluetooth and mobile connections for this app.

    1 Reply Last reply
    0

    1/1

    6 Nov 2020, 14:38

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved