Geek Dashboard Home
  • News
  • Smartphones
    • Android
    • iOS
  • Computers
    • Windows
    • macOS
  • Internet
  • Reviews
  • Tools
    • Password Generator
    • iFrame Tester
Search Geek Dashboard
Home • Mobiles

How to Stop Android From Killing Apps Automatically in Background [All OEMs]

Amar Ilindra • Updated December 7, 2021 • 13 min read •

Android OEMs (Original Equipment Manufacturer) Huawei, Xiaomi, OnePlus, Samsung, Oppo, Vivo are literally turning smartphones into lazyphones. Have you ever notice your Android killing apps in the background and they suddenly stop working? I’m sure you must have seen this problem in automation apps like Notification History Log, Tasker, Wear apps, and more.

Do you know why these apps stop working on your device but continue to work flawlessly on devices running on Stock Android? If you don’t know, your device manufacturer is the culprit.

Google has already taken care of limiting background services and optimizing battery usage with Doze mode. But many OEMs have again added multiple layers of meaningless restrictions in the name of squeezing extra battery. These limitations are by default enabled for every app you download except popular apps (which are whitelisted internally) and users are unaware of it.

And for Android developers, it was a nightmare. Developers follow Google policies and they show persistent notification while running long background tasks. But even with persistent notifications, the background services are being killed by OEMs because an app is not on the whitelisted list.

One of our apps Notification History Log is also badly affected due to different restrictions imposed by different Android OEMs. The worst part is, each OEM has different implementations and no official APIs are available for requesting users to whitelist our app.

OEMs Killing Background Apps Problem in Android

  • If you are a user and notice an app stops working suddenly, please don’t leave 1-star reviews on Play Store. Try to contact the app developer first to understand why the app is misbehaving.
  • If you are an OEM, please stop adding new restrictions on apps. Use Stock Android instead. It saves both you and developers a lot of time and money.

Since a lot of users and developers are looking for a solution to stop Android from killing apps in the background. We decided to write this guide to help users, developers, and our Notification History Log users.

Prevent Apps From Being Killed Automatically in your Android Smartphone

Stop Android From Killing Apps in background

For convenience, we have taken the Notification History Log app as the app name and we’ll explain the steps in detail to whitelist it from all popular OEMs which are turning smartphones to lazyphones. If you don’t find your OEM in the list, choose “Others” to know the common steps.

Choose your manufacturer

  • Huawei
  • Samsung
  • OnePlus
  • Asus
  • Nokia
  • Lenovo
  • Xiaomi
  • Pixel Phones
  • Motorola Phones
  • other OEMs

Huawei

Huawei is well known for breaking app functionalities and developers will frequently get reports from Huawei users. We are not an exception. Over 50% of emails and 1-star reviews we receive are from Huawei devices. Unfortunately, there was no straightforward solution to whitelist Notification History Log or any other app in EMUI.

From EMUI 9, Huawei has added a new application called PowerGenie which will kill all apps unless it is whitelisted in PowerGenie app. Unfortunately, PowerGenie has no customization options available to add more apps to the whitelist and you can also uninstall/disable PowerGenie completely.

This means it is not possible to fix the problem correctly in EMUI 9. Still, it is recommended to try the common steps to temporarily solve the problem.

If you find Notification History Log or any other apps stopped working on your Huawei device, please follow the below steps to make changes in your phone settings:

Note: You might not find all the below-mentioned options on your mobile. You can safely ignore them if they are not available on your Huawei mobile.

Change 1:

  1. Go to phone Settings
  2. Select Advanced Settings.
  3. Tap on Battery Manager.
  4. Change the Power plan to Performance.

Change 2:

  1. Go to phone Settings.
  2. Select Advanced Settings.
  3. Open Battery Manager and tap on Protected apps.
  4. Set Notification History Log (or any app of your choice) as Protected.

Change 3:

  1. Go to phone Settings
  2. Select Apps.
  3. Choose Notification History Log (or any app of your choice) from the list.
  4. Tap on Battery.
  5. Disable Power-intensive prompt.
  6. Disable Close after screen locked.
  7. Enable Keep running after screen off (if available).

disable background restrictions in Huawei devices

Change 4:

  1. Go to phone Settings
  2. Tap on Apps.
  3. Click the Settings / Gear icon at the bottom.
  4. Under Advanced, select Special Access.
  5. Now click on Ignore battery optimization and change “Allowed” to “All apps”.
  6. Choose Notification History Log (or any app of your choice) from the list and set it to Allow.
  7. Hit OK to confirm the changes.

ignoring battery optimisation in Huawei smartphones

For Notification History Log users, after making the above changes, go to the Troubleshooting screen in the Notification History Log app and click on Re-enable Permission button. Now disable Notification access permission and enable it again after one minute.

Samsung

In the latest Samsung flagship devices, a new feature called Sleeping Apps is added. Apps that are included in this “Sleeping Apps” list will never run in the background, will never receive updates, and even can not show notifications. You need to first make sure the Notification History Log (or any app of your choice) is not added to “Sleeping Apps”.

Make the following changes in your Samsung device to stop apps from being killed automatically:

Change 1:

  1. Go to phone Settings.
  2. Open Device Care.
  3. Tap on Battery.
  4. Click on 3-vertical dots on the top right and select Settings.
  5. Here you need to disable
    • Adaptive Battery
    • Put unused apps to sleep
    • Auto disable unused apps
  6. After disabling the above options, now click on Sleeping Apps.
  7. Click on the Trash icon on the top-right to remove all applications from sleep.

Change 2:

On Samsung Galaxy S8, there is yet another feature called App Power Monitor which keeps apps to sleep when not used for 3 continuous days. But there will be plenty of apps that work in the background to sync data, monitor notifications, alarms, etc, which will not be opened every day but still need to function. In this case, you need to disable App Power Monitor as explained below.

  1. Open phone Settings
  2. Tap on Device maintenance.
  3. Select Battery.
  4. Disable App Power Monitor.

Change 3:

On other Samsung devices, follow the steps below to disable battery optimization:

  1. Go to phone Settings.
  2. Tap on Applications.
  3. Click 3-vertical dots on the top right corner and select Special Access.
  4. Select Optimize Battery usage.
  5. Select Notification History Log (or any app of your choice) from the list and change it to Don’t optimize.

Change 4:

On older version on Samsung devices, you need to disable power saving modes as follows:

  1. Open phone Settings
  2. Select Battery.
  3. Click Power saving mode and turn it off.
  4. Click  Ultra power-saving mode and turn it off.

disable power saving modes in Samsung devices

For Notification History Log users, after making the above changes, go to the Troubleshooting screen in Notification History Log app and click on Re-enable Permission button. Now disable Notification access permission and enable it again after one minute.

OnePlus

OnePlus is very popular for its stunning Oxygen OS UI and features. But coming to battery optimization, it has its own limits and disadvantages. Being a user, you need to make a few changes in your phone settings to stop OnePlus from killing the apps that run in the background.

Here are the most common changes you need to make to prevents apps from killing automatically:

Change 1:

  1. Go to phone Settings.
  2. Tap on Apps.
  3. Click on Gear icon on the top right and tap on Special Access.
  4. Click on Battery.
  5. Choose Notification History Log from the list and change it to Not optimize.

Due to a bug in Oxygen OS, OnePlus might revert this change randomly anytime. So you need to keep an eye and change it again to “Not Optimize” if it reverts to default sometime later.

One quick solution to prevent this problem:

  1. Open Notification History Log (or any other app) you wish to run in the background.
  2. Tap on recent apps button to see the list of minimized apps.
  3. Now click on the Lock button on the top-right of the app preview.

Once you lock the app, it will keep running in the background and battery optimization setting will never change to default.

Change 2:

On a few OnePlus models, you need to make sure App Auto-Launch is enabled for your app. To do this:

  1. Go to phone Settings.
  2. Tap on Apps.
  3. Click on Gear icon on the top right and tap on App auto-launch.
  4. Now enable App auto-launch for Notification History Log (or any app of your choice).

Change 3:

If you are still facing random killing of app’s background services, try doing the following change:

  1. Go to phone Settings.
  2. Tap on Battery.
  3. Select Battery optimization.
  4. From the top drop-down menu, change the type to All Apps.
  5. Select Notification History Log (or any app of your choice) from the list and change it to Don’t optimize.
For Notification History Log users, after making the above changes, go to Troubleshooting screen in the Notification History Log app and click on Re-enable Permission button. Now disable Notification access permission and enable it again after one minute.

Asus

In a few Asus devices, Power Master app was pre-installed which will automatically kill background tasks when your phone screen is turned off and it also stops them from restarting. To make sure your Asus device will never kill the background running apps, you need to do the following changes on your device:

  1. Open PowerMaster application.
  2. Select Battery-saving options.
  3. Turn off Clean up in suspend.
  4. Turn off Auto-deny apps from auto starting.
  5. Click back and now select Auto-start manager.
  6. Tap on the Downloaded tab and enable Notification History Log (or any app of your choice).

Nokia

Few Nokia smartphones come with Power Saver application pre-installed which is responsible for killing apps that running in the background. Unfortunately, there is only a temporary solution available to fix this problem in Nokia devices:

  1. Go to phone Settings.
  2. Tap on Apps.
  3. Select All Apps.
  4. Tap on three vertical dots menu or gear icon on the top-right corner and select Show system.
  5. Scroll down to tap on Power Saver application and Force Stop it.
  6. If Uninstall button is available, you can uninstall Power Saver application to fix the problem permanently. Sadly, the uninstall option is enabled only on a few sets of Nokia devices.
Note: Power Saver application can anytime restart itself and you may need to force stop it whenever you notice the apps you use starts misbehaving.

For Notification History Log users, after making the above changes, go to Troubleshooting screen in Notification History Log app and click on Re-enable Permission button. Now disable Notification access permission and enable it again after one minute.

Lenovo

Lenovo mobiles very rarely kill the background apps but there are few Lenovo devices that will instantly kill entire app processes when it is swiped away from running apps. Here is the quick solution for Lenovo users:

Change 1:

  1. Go to phone Settings.
  2. Select Apps.
  3. Choose Notification History Log (or any app of your choice) from the list.
  4. Tap on Battery.
  5. Change “Not optimized” to All Apps.
  6. Again select Notification History Log (or any app of your choice).
  7. Change to Don’t Optimize and hit Save/Done.

Change 2:

  1. Open Notification History Log (or any app of your choice).
  2. Tap on recent apps button to see the list of minimized apps.
  3. Click on the Lock button on top of the app preview.
For Notification History Log users, after making the above changes, go to Troubleshooting screen in Notification History Log app and click on Re-enable Permission button. Now disable Notification access permission and enable it again after one minute.

Xiaomi

Xiaomi’s MIUI was loved by 50% of Android users and the rest of them just hate it. I’m sure 100% of developers hate MIUI for its poor APIs, documentation and bug tracking. For Notification History Log, we have completely excluded all Xiaomi mobiles (except Mi A series) from the list of supported devices.

Unfortunately for developers, no APIs are available for requesting users to make the changes or to check user settings information. Fortunately for users, they can do (a lot of) changes in their phone settings to stop MIUI from killing the background running apps:

Change 1:

  1. Open Security App.
  2. Tap on Permissions. (If you don’t find Permissions option on Security app home screen, it will be inside “Manage Apps” on few models)
  3. Select Auto-start.
  4. Now Enable auto-start for Notification History Log (or any app of your choice).

Enable Autostart in Xiaomi Smartphones

Change 2:

  1. Open Security App.
  2. Tap on Battery.
  3. Select App Battery Saver.
  4. Choose Notification History Log (or any app of your choice).
  5. Set it to No Restrictions.

disable background restrictions for apps on Xiaomi smartphones

Change 3:

  1. Open phone Settings.
  2. Click on Apps.
  3. Select Notification History Log (or your app of choice).
  4. Tap on Other permissions.
  5. Enable Start in background.

start apps in background on xiaomi smartphones

Change 4:

  1. Open phone Settings.
  2. Select Advanced Settings.
  3. Tap on Battery manager.
  4. Set the Power plan to Performance.

Change 5:

  1. Open phone Settings.
  2. Select Advanced Settings.
  3. Tap on Battery manager.
  4. Choose Protected Apps.
  5. Make sure Notification History Log (or your app of choice) is added to list of protected apps.

Change 6:

  1. Open phone Settings.
  2. Click on Apps.
  3. Select Notification History Log (or your app of choice).
  4. Tap on Battery.
  5. Enable Power-intensive prompt.
  6. Enable Keep running after screen off.

Change 7:

  1. Open phone Settings.
  2. Select Additional Options.
  3. Tap on Battery & Performance.
  4. Open Manage apps battery usage.
  5. Now disable Power Saving Modes.

Bonus: When you click on recent apps button at the bottom of your screen, drag the app preview downwards to pin the app. When you do this, the app will not be removed when you clear recent apps and background process of the app continue to work indefinitely.

Pixel, Nexus, and Other Stock Android Devices

Devices running on Stock Android very rarely notice apps killing in background issues. You need to first make sure you are not using any speed booster or RAM cleaner applications. If you use any similar applications which claim to improve your device speed, uninstall them immediately. They won’t work as promised and even sometimes slow down your device.

In devices running on Android Pie or higher, make sure you have NOT accidentally enabled background restrictions to Notification History Log (or any app of your choice). You can verify it at phone Settings > Apps > Notification History Log (or any app of your choice) > Advanced > Battery > Background restrictions.

disable background restrictions on smartphones running stock Android

If everything fails and you still face the problem, try disabling battery optimization as shown below:

  1. Go to phone Settings.
  2. Select Apps & notifications.
  3. Choose Notification History Log (or your app of choice).
  4. Tap on Battery.
  5. Change the dowp-down value from “Not optimized” to All Apps.
  6. Scroll down to select Notification History Log (or your app of choice).
  7. Change to Don’t Optimize.
  8. Hit the Done button to confirm the change.
For Notification History Log users, after making the above changes, go to Troubleshooting screen in Notification History Log app and click on Re-enable Permission button. Now disable Notification access permission and enable it again after one minute.
Conclusion

Due to thousands of Android devices in the market and tens of OEMs, it is impossible to follow one single step to stop Android from killing apps in the background. And the worst part is, even devices from the same manufacturer come with different settings and options. I wish Google solves this fragmentation problem in Android and make it easier like iOS.

Being a user, all you have to do is, try the changes I have mentioned above for your device and see if it stop apps from being killed in the background. Since each device comes with different features and options, you might not find a few above settings on your mobile. In this case, you can either ignore it or check if any similar terms are available in your settings.

Mobiles Android ASUS Google Pixel Huawei Mi OnePlus Samsung Xiaomi

Be the Change!

Spread the word and help us create better tech content

Facebook Twitter Reddit WhatsApp Pinterest
Avatar for Amar Ilindra

Amar Ilindra

•
Facebook LinkedIn Instagram GitHub

Amar Ilindra is a tech-savvy individual who is passionate about gadgets and new technology. He is a full-stack developer who enjoys experimenting with technology and sharing his experiences through blogging. When he's not writing, he devotes his time to creating practical web and mobile applications for both Android and iOS platforms.

Read all 480 articles from Amar

Comments

  1. Avatar for Cainã RangelCainã Rangel says

    October 18, 2023 at 6:17 PM

    How can I do It on iPhone?

  2. Avatar for WilliamWilliam says

    September 26, 2022 at 5:14 AM

    This is great but I think it’s outdated. This is the exact problem I’ve having with other apps however none of these settings exist for me

  3. Avatar for HaukeHauke says

    November 10, 2021 at 11:13 AM

    Stock Android 12 is now killing background apps too, and all options to stop that are removed or not working. (Pixel 6 pro).

  4. Avatar for MarkMark says

    July 10, 2021 at 4:56 PM

    Was this written by a child?

    • Avatar for Amar IlindraAmar Ilindra says

      July 10, 2021 at 8:52 PM

      Definitely not. Why do you think so?

  5. Avatar for Nathan KulmerNathan Kulmer says

    June 4, 2021 at 10:11 AM

    None of these solutions worked on my TCL 10L on Android 11. An alarm app I used on my old phone doesn’t work half the time on this one because it is always getting force stopped even with battery optimization turned off AND locking it so it won’t get cleared away when I clear all apps occasionally. Very very irritating to say the least. If you have any other suggestions please let me know. Thanks!

    • Avatar for Amar IlindraAmar Ilindra says

      June 4, 2021 at 11:55 AM

      Android 11 is really a nightmare for developers. A lot of apps are affected. Samsung and TCL are no exceptions.

      • Avatar for John SJohn S says

        December 13, 2023 at 4:29 AM

        Amar – thanks, this is a super-useful article.
        Nathan , here’s a solution for TCL phones. The problem is an app called ‘Smart Manager’ that ships with TCL phones and can’t be uninstalled. ‘Smart Manager’ aggressively kills apps to preserve battery – that is what’s force-stopping your apps. See instructions below to fix this… (note: this works for other apps too, eg it enables TCL phones to be used with Parental Control apps like Qustodio, Norton Family, etc).

        … using ‘Qustodio Kids’ as an example

        Open Smart Manager app
        … either from home screen, or from Settings > Smart Manager

        1. Smart Manager > Auto-start
        Turn off ‘Automatically manage’
        Ensure your app is on – ‘Qustodio Kids’ in this case
        2. Smart Manager > Battery
        Turn off Normal saving mode
        Turn off Super saving mode
        3. Smart Manager > Battery > Battery detail
        Turn off Battery saver
        Turn off Battery manager
        4. Smart Manager > Notifications
        Ensure your app is on – ‘Qustodio Kids’ in this case

  6. Avatar for BhavinBhavin says

    June 2, 2021 at 7:41 PM

    Is it possible those settings from coding side?
    As per my knowledge, it can’t possible. Inform me if it can possible.

    • Avatar for Amar IlindraAmar Ilindra says

      June 2, 2021 at 7:51 PM

      No. It is not possible to do them programmatically.

      The best a developer can do is opening the Intents (if available)

  7. Avatar for Martin MichaelsMartin Michaels says

    January 7, 2021 at 12:28 AM

    I too am a developer and it is especially annoying when I switch away from my all for two second and when I come back it had to completely reload the web view. Why??? It can’t be a legitimate reason like memory pressure because it manifests when there is plenty of free memory. I will never forgive Google for not providing hooks to allow proper control of the phone your bought and paid for! Can you imagine if a desktop or laptop could at any time kill any program you were running without a darn good reason?

  8. Avatar for DanteDante says

    December 17, 2020 at 6:51 PM

    Is there an app that overrides the setting making certain an app does not go to sleep? I have tried this and its not working

  9. Avatar for SergeySergey says

    November 9, 2020 at 3:30 PM

    Thanks a lot!

  10. Avatar for GarageGarage says

    October 14, 2020 at 12:00 AM

    Thanks a lot for this post! I have a lot of problems with this and every time a customer have it, i suggest this, and almost always solves the problem. Keep it up to date

  11. Avatar for Jaskirat SinghJaskirat Singh says

    September 4, 2020 at 12:15 AM

    It has been a nightmare! Being an Android Developer, I have been a victim of my apps being shut and put to sleep automatically by the OEMs. Even though my app works in the Doze mode and follow the guidelines according to Google, it is still shut off by the OEMs.

    App vendors and users are left hanging with a useless app as it fails to function as it should.

    I am doing every bit of research on this and trying to find a way to allow my app run in the background and not get killed by the OS. Hoping to find something.

Over 1,30,286+ Followers

Join now to get all latest updates from Geek Dashboard

Facebook Twitter Telegram Pinterest YouTube Instagram

Recently Published

  1. TAGRY X08 True Wireless Earbuds Review: Budget-Friendly Excellence with Long Battery Life
  2. Why Are Tech Lawsuits Becoming the New Normal in the US
  3. My Experience of Using TuneFab Amazon Video Downloader
  4. Wondershare Dr. Fone 13 Review - The Ultimate Mobile Toolkit for iOS and Android
  5. TOZO OpenEgo Review - Is It a Reliable and Practical Headphone?
  6. Samsung Lost its Crown as the Top Foldable Smartphone Seller Worldwide

Download the Apps Now

We put a lot of effort and resources in writing our articles, and we believe it is our responsibility to satisfy your tech hunger

Download Geek Dashboard Android App on Google PlayAndroid App onGoogle Play Download Geek Dashboard Extension on Chrome Web StoreBrowser Extension onChrome Web Store
Geek Dashboard Logo

Geek Dashboard brings you the latest and greatest in technology news, reviews, and how-to guides. From smartphones to laptops, drones to VR and everything in between, we've got you covered

Got a Tip? Write In? tip@geekdashboard.com

© 2012 - 2025 · Geek Dashboard, product of ikva eSolutions

  • Blog
  • Advertise
  • About
  • Jobs
  • Contact
  • Privacy Policy
  • Write For Us
  • T&C
  • Office Setup

No dogs were injured while working on this website because we love them