How to prevent Android from automatically killing apps in the background [All OEMs]

by
How to prevent Android from automatically killing apps in the background [All OEMs] 1

Android OEM (Original Equipment Manufacturer) Huawei, Xiaomi, OnePlus, Samsung, Oppo, Vivo they are literally spinning smartphones on lazy phones. Have you ever noticed that your Android apps kill in the background and suddenly stop working? I'm sure you must have seen this problem in automation apps like Notification History Log, Tasker, Use apps and more.

Do you know why these applications stop working on your device but continue to work without problems on devices that work with Stock Android? If you don't know, the manufacturer of your device is to blame.

  

Google has already taken care of limiting background services and optimizing battery usage with Sleep mode. But many OEMs have again added several layers of meaningless restraints in the name of squeezing out the extra battery. These limitations are enabled by default for every app you download, except for popular apps (which are internally whitelisted) and users don't know about it.

And for Android developers, it was a nightmare. Developers follow Google's policies and show persistent notification while running long tasks in the background. But even with persistent notifications, OEMs are killing background services because an app isn't whitelisted.

One of our applications Notification history log It is also seriously affected due to the different restrictions imposed by different Android OEMs. The worst part is that each OEM has different implementations and there are no official APIs available to request users to whitelist our app.

  • If you are a user and you notice that an application suddenly stops working, don't go 1-star in the Play Store. Try contacting the app developer first to understand why the app is misbehaving.
  • If you are an OEM, please stop adding new restrictions to applications. Use Stock Android instead. It saves you and developers a lot of time and money.

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

Prevent apps from being automatically removed on your Android smartphone

Stop Android from killing apps in the background

For convenience, we have taken the Notification History Log app as the app name and we will explain the steps in detail to whitelist all of the popular OEMs that are changing smartphones To the sloths If you can't find your OEM in the list, choose "Other" for common steps.

Choose your manufacturer

Huawei

Huawei is well known for breaking app functionality and developers will receive frequent 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 direct solution to whitelist Notification History or any other app in EMUI.

EMUI 9Huawei has added a new app called PowerGenie which will remove all apps unless it's whitelisted in PowerGenie app. Unfortunately, PowerGenie has no customization options available to whitelist more apps and you can also uninstall / disable PowerGenie entirely.

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

If you find that the notification history log or any other app stopped working on your Huawei device, follow the steps below to make changes to your phone settings:

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

Change 1:

  1. Go to the phone Configurations
  2. Select Advanced settings.
  3. Touchez on Battery Manager.
  4. Change the Power plan to Performance.

Change 2:

  1. Go to the phone Configurations.
  2. Select Advanced settings.
  3. Open Battery Manager and play Protected applications.
  4. Set the notification history log (or whatever app you choose) as Protected.

Change 3:

  1. Go to the phone Configurations
  2. Select Applications.
  3. Choose Notification history log (or any application of your choice) from the list.
  4. Touchez on Battery.
  5. Disable Energy intensive indicator.
  6. Disable Close after locked screen.
  7. Enable Keep running after turning off the screen (if available).

disable background restrictions on Huawei devices

Change 4:

  1. Go to the phone Configurations
  2. Touchez on Applications.
  3. Click Configurations / / Gear icon at the bottom.
  4. Under Advanced, select Special access.
  5. Now click Ignore battery optimization and change "Allowed" to "All apps".
  6. Choose Notification history log (or whatever app you choose) from the list and set it to Allow.
  7. Hit OK to confirm the changes.

ignoring battery optimization on Huawei smartphones

For notification history log users, after making the above changes, go to Problem solving screen in the Notification History Log app and click Re-enable permission button. Now disable the notification access permission and enable it again after a minute.

Samsung

On Samsung's latest flagship devices, a new feature called Sleeping apps It is added. The apps included in this "Sleeping Apps" list will never run in the background, never receive updates, and can't even show notifications. You must first make sure that the Notification History Log (or whatever app you choose) is not added to “Sleeping Apps”.

Make the following changes to your Samsung device to prevent apps from being automatically removed:

Change 1:

  1. Go to the phone Configurations.
  2. Open Device care.
  3. Touchez on Battery.
  4. Click 3 vertical dots in the upper right and select Configurations.
  5. Here you need disable
    • Adaptive battery
    • Put unused apps to sleep
    • Automatically disable unused apps
  6. After disabling the above options, now click Sleeping apps.
  7. Click on the Garbage icon in the upper right corner to remove all applications from sleep mode.

Change 2:

At Samsung Galaxy S8, there is another feature called App Power Monitor that keep apps sleeping when not in use for 3 continuous days.But there will be many apps that work in the background to sync data, monitor notifications, alarms, etc., that won't open every day but still need to work. In this case, you need disable App Power Monitor as explained below.

  1. Open phone Configurations
  2. Touchez 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 the phone Configurations.
  2. Touchez on Applications.
  3. Click 3 vertical dots in the upper right corner and select Special access.
  4. Select Optimize battery use.
  5. Select Notification history log (or whatever app you choose) from the list and change it to Do not optimize.

Change 4:

In previous versions on Samsung devices, you must disable the power saving modes as follows:

  1. Open phone Configurations
  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 on Samsung devices

For notification history log users, after making the above changes, go to Problem solving screen in the Notification History Log app and click Re-enable permission button. Now disable the notification access permission and enable it again after a minute.

Oneplus

OnePlus is very popular for its amazing user interface and Oxygen OS features. But coming to battery optimization, it has its own limits and disadvantages. As a user, you need to make some changes to your phone's settings to prevent OnePlus from removing apps that are running in the background.

Here are the most common changes you need to make to prevent apps from being automatically removed:

Change 1:

  1. Go to the phone Configurations.
  2. Touchez on Applications.
  3. Click on Gear icon in the upper right corner and Touchez Special access.
  4. Click on Battery.
  5. Choose Notification history log from the list and change it to Do not optimize.

Due to a bug in Oxygen OS, OnePlus may reverse this change randomly at any time. Therefore, you should be vigilant and change it back to "Do Not Optimize" if it returns to the default value at a later time.

A quick solution to prevent this problem:

  1. Open the notification history log (or any other app) you want to run in the background.
  2. Touch the recent apps button to see the list of minimized apps.
  3. Now click on the To block button at the top right of the application preview.

Once you lock the app it will continue to run in the background and the battery optimization settings will never change to the default.

Change 2:

On some OnePlus models, you need to make sure Automatic launch of applications is enabled for your application. To do this:

  1. Go to the phone Configurations.
  2. Touchez on Applications.
  3. Click on Gear icon in the upper right corner and Touchez Automatic start of the application.
  4. Now enable Automatic start of the application to record the notification history (or any application you choose).

Change 3:

If you're still facing random deletion of app background services, try making the following change:

  1. Go to the phone Configurations.
  2. Touchez on Battery.
  3. Select Battery optimization.
  4. From the top dropdown, change the type to All applications.
  5. Select Notification history log (or whatever app you choose) from the list and change it to Do not optimize.

For notification history log users, after making the above changes, go to Problem solving screen in the Notification History Log app and click Re-enable permission button. Now disable the notification access permission and enable it again after a minute.

Asus

On some Asus devices, Power Master application It was pre-installed, which will automatically remove background tasks when the phone screen is off and also prevent them from restarting. To ensure that your Asus device will never remove apps that are running in the background, you need to make the following changes to your device:

  1. Open Powermaster request.
  2. Select Battery saving options.
  3. To turn off Clean in suspension.
  4. To turn off Automatically deny autostart applications.
  5. Click Back and now select Autostart manager.
  6. Play the Discharged tab and enable Notification history log (or any application you choose).

Nokia

Few Nokia smartphones go with Energy Saver pre-installed application that is responsible for removing applications that are running in the background. Unfortunately, there is only one workaround available to fix this problem on Nokia devices:

  1. Go to the phone Configurations.
  2. Touchez on Applications.
  3. Select All applications.
  4. Touchez the three vertical dots menu or gear icon in the upper right corner and select Show system.
  5. Scroll down to touch Energy Saver application and Forced stop that.
  6. If the Uninstall button is available, you can uninstall the Power Saver application to fix the problem permanently. Unfortunately, the uninstall option is enabled only on some Nokia device sets.

Note: The Power Saver application can be restarted at any time and you may need to force stop every time you notice that the applications you are using are beginning to misbehave.

For notification history log users, after making the above changes, go to Problem solving screen in the Notification History Log app and click Re-enable permission button. Now disable the notification access permission and enable it again after a minute.

Lenovo

Lenovo mobiles rarely remove apps in the background, but there are few Lenovo devices that instantly kill entire app processes when you get away from running apps. Here is the quick solution for Lenovo users:

Change 1:

  1. Go to the phone Configurations.
  2. Select Applications.
  3. Choose Notification history log (or any application of your choice) from the list.
  4. Touchez on Battery.
  5. Change "Not optimized" to All applications.
  6. Again select Notification history log (or any application you choose).
  7. Switch to Do not optimize and press Save / Done.

Change 2:

  1. Open the notification history log (or whatever app you choose).
  2. Touch the recent apps button to see the list of minimized apps.
  3. Click on the To block button at the top of the app preview.

For notification history log users, after making the above changes, go to Problem solving screen in the Notification History Log app and click Re-enable permission button. Now disable the notification access permission and enable it again after a minute.

Xiaomi

Xiaomi's MIUI was loved by 50% of Android users and the rest just hates it. I'm sure 100% of developers hate MIUI for its poor APIs, documentation, and bug tracking. For the record of notification history, we have completely excluded all Xiaomi phones (except Mi A series) from the list of compatible devices.

Unfortunately for developers, there are no APIs available to request users to make changes or verify user configuration information. Fortunately for users, they can make (many) changes to their phone's settings to prevent MIUI from removing apps running in the background:

Change 1:

  1. Open Security App.
  2. Touchez on Permissions. (If you do not find the Permissions option on the home screen of the Security application, it will be under "Manage applications" in some models)
  3. Select Auto start.
  4. Now Enable Auto start for notification history log (or any application of your choice).

Enable auto start on Xiaomi smartphones

Change 2:

  1. Open Security App.
  2. Touchez on Battery.
  3. Select App Battery Saver.
  4. Choose the notification history log (or whatever app you choose).
  5. Set it to Without restrictions.

disable background restrictions for apps on Xiaomi smartphones

Change 3:

  1. Open phone Configurations.
  2. Click on Applications.
  3. Select Notification History Record (or your app of choice).
  4. Touchez on Other permissions.
  5. Enable Start in the background.

launch background apps on xiaomi smartphones

Change 3:

  1. Open phone Configurations.
  2. Select Advanced settings.
  3. Touchez on Battery Manager.
  4. Select the Power plan to Performance.

Change 4:

  1. Open phone Configurations.
  2. Select Advanced settings.
  3. Touchez on Battery Manager.
  4. Choose Protected applications.
  5. Be sure to add the Notification History Log (or the app of your choice) to the list of protected apps.

Change 5:

  1. Open phone Configurations.
  2. Click on Applications.
  3. Select Notification History Record (or your app of choice).
  4. Touchez on Battery.
  5. Enable Energy intensive indicator.
  6. Enable Keep running after turning off the screen.

Change 6:

  1. Open phone Configurations.
  2. Select Additional options.
  3. Touchez on Battery and performance.
  4. Open Manage app battery usage.
  5. Now disable Energy saving modes.

Cousin: When you click the recent apps button at the bottom of the screen, drag the app preview down to pin it. When you do this, the app will not be removed when you delete recent apps and the app's background process continues to work indefinitely.

Pixel, Nexus and other stock Android devices

Devices running on Stock Android rarely notice apps go off in the background. You must first make sure that you are not using any speed booster or RAM cleaner application. If you use similar apps that claim to improve the speed of your device, uninstall them immediately. They will not work as promised and sometimes even slow down your device.

On devices with Android Pie or higher, make sure you have NO Background restrictions accidentally enabled for logging notification history (or whatever app you choose). You can check it on the phone Configurations > Applications > Notification history log (or whatever app you choose)> Advanced > Battery > Background restrictions.

disable background restrictions in smartphones running stock android

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

  1. Go to the phone Configurations.
  2. Select Applications and notifications.
  3. Choose Notification history log (or your application of choice).
  4. Touchez on Battery.
  5. Change the descending value from "Not Optimized" to All applications.
  6. Scroll down to select Notification history log (or your application of choice).
  7. Switch to Do not optimize.
  8. Hit the Done button to confirm the change.

For notification history log users, after making the above changes, go to Problem solving screen in the Notification History Log app and click Re-enable permission button. Now disable the notification access permission and enable it again after a minute.

conclusion

Due to thousands of Android devices on the market and dozens of OEMs, it is impossible to follow a single step to prevent Android from killing apps in the background. And the worst part is that even devices from the same manufacturer come with different settings and options. I want Google to solve this fragmentation problem on Android and make it easier like iOS.

As a user, all you have to do is test the changes I mentioned above for your device and see if it prevents apps from being removed in the background. Since each device comes with different features and options, you may not find some previous settings on your mobile device. In this case, you can either ignore it or check if similar terms are available in your settings.