How to Stop Your Android Phone from Automatically Closing Background Apps

Modern Android smartphones, particularly those manufactured by Samsung, Xiaomi, and OnePlus, employ highly aggressive battery management systems. To maximize battery life and free up RAM, the operating system will ruthlessly kill applications running in the background. If you switch away from Spotify, a fitness tracker, or a VPN app for more than a few minutes, you may find that the app has been completely shut down when you try to return to it.

While this aggressive memory management technically improves battery life, it breaks the functionality of apps that rely on persistent background processes (like step counters or offline music players).

If you have an app that keeps dying the moment you lock your screen, you can exempt it from Android’s battery optimization.

How to Stop Android from Killing Specific Apps

Because Android is highly fragmented, the exact menu names will vary slightly depending on your phone’s manufacturer, but the general process remains identical across all modern Android devices.

  1. Open the Settings app on your Android phone.
  2. Scroll down and tap on Apps (or App Management).
  3. Tap on See all apps to view your full list of installed software.
  4. Scroll down and tap on the specific app that keeps closing in the background (e.g., Spotify).
  5. On the App Info page, tap on Battery.
  6. You will typically see three options: Unrestricted, Optimized (default), and Restricted.
  7. Change the setting from “Optimized” to Unrestricted.

By setting the app to “Unrestricted,” you are explicitly instructing the Android operating system to ignore this application when it performs its routine memory-clearing sweeps. The app will now run permanently in the background, consuming battery as needed, until you manually swipe it away from your recent apps menu or force stop it.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.