Keep Background Services Alive on Android (by Brand)

From Biolovision Help
Jump to navigation Jump to search

Keep Background Services Alive on Android: Battery Optimization Fixes by Brand

Many Android phone manufacturers implement aggressive battery optimization policies that kill background services, even foreground ones. This behavior breaks apps that rely on persistent background functionality (like GPS tracking, health monitoring, or messaging).

Below are device-specific instructions to help users configure their phones properly and keep background services alive.

General Recommendations

  • Ensure the app uses a Foreground Service with a persistent notification
  • Ask the user to disable battery optimizations
  • Detect the device brand programmatically (`Build.MANUFACTURER`) and show brand-specific help
  • Optionally link to dontkillmyapp.com

Xiaomi / Redmi / Poco (MIUI)

MIUI is known for aggressively killing background services.

Steps to allow background operation:

  1. Go to Settings > Battery
  2. Tap on Battery saver
  3. Tap on Battery saver for apps (or App battery saver)
  4. Find your app and set it to No restrictions
  5. Go to Settings > Apps > Manage apps
  6. Tap your app and enable Autostart
  7. Open the recent apps screen, swipe down your app and tap the lock icon 🔒 to prevent it from being cleared

Huawei / Honor (EMUI)

EMUI kills background tasks aggressively, even for foreground services.

Steps to fix:

  1. Go to Settings > Battery
  2. Tap App launch
  3. Disable Manage all automatically
  4. Manually enable Auto-launch, Secondary launch, and Run in background for your app

Samsung (One UI)

Samsung is more moderate but still applies background restrictions.

Steps:

  1. Go to Settings > Battery and device care > Battery
  2. Tap Background usage limits
  3. Tap Never sleeping apps
  4. Add your app to the list
  5. Optional: Go to Settings > Apps > your app > Battery and choose Unrestricted

OnePlus (OxygenOS)

OnePlus uses aggressive RAM and battery management.

Steps:

  1. Go to Settings > Battery
  2. Tap Battery optimization
  3. Set your app to Don't optimize
  4. Go to Settings > Apps & notifications > Special app access > Battery optimization
  5. Again, set your app to Don't optimize

Oppo / Realme (ColorOS)

ColorOS kills background processes aggressively.

Steps:

  1. Go to Settings > Battery
  2. Tap App battery management
  3. Find your app and select Allow background activity
  4. Also check Settings > App management > your app > Battery usage
  5. Set it to Unlimited

Vivo

Vivo applies similar background limits.

Steps:

  1. Go to Settings > Battery
  2. Tap on High background power consumption
  3. Find your app and enable it
  4. Go to Settings > App manager > your app
  5. Enable Allow background activity

External Resources