Modern operating systems, such as Android, are designed with an emphasis on energy saving and autonomous operation of the device. This means that the system actively monitors running processes and mercilessly “kills” those that consume resources in the background if the user does not interact with them. For most scenarios, this is a benefit that prolongs battery life, but for specific tasks - instant messengers, navigators, activity trackers or music players - this behavior becomes a critical problem.
You have probably encountered a situation where the music stops after an hour, and important notifications arrive with a delay. This is the result of battery optimization algorithms that aggressively terminate processes. To change this operating logic, the user must manually intervene in the system settings, giving specific apps a special status. In this article, we'll look at all the available methods, from simple toggles in the menu to advanced settings through the developer menu.
It is important to understand that keeping applications in memory comes at a cost. Constantly running background services increases battery consumption and can lead to heating of the smartphone body. Therefore, you should use the methods described below selectively, only for those apps whose continuous operation is truly vital for your daily tasks.
Setting up battery optimization for specific applications
The first and most effective step is to disable system power optimization for selected apps. By default Android places all applications in “Optimized” mode, which allows the system to limit their activity in the background. Changing this setting to “Do not optimize” gives the application the green light to work without restrictions.
The setup process may vary slightly depending on the manufacturer’s shell (MIUI, OneUI, ColorOS), but the general algorithm remains the same. You need to find the section responsible for managing application power. Usually the path looks like this: Settings → Applications → Accessibility → Battery optimization. In some versions of the interface, this item is hidden in a menu of three dots in the upper right corner of the screen.
After entering the menu, you will see a list of all installed apps. By default, only those that are being optimized are displayed. Click on the filter and select All Apps. Find the desired service in the list (for example, a messenger or navigator) and switch the toggle switch to the “Do not optimize” position. The system will issue a warning about a possible increase in energy consumption - confirm the action.
⚠️ Attention: Disabling optimization for dozens of applications at the same time can reduce the battery life of your smartphone by 20-30%. Apply this setting specifically to critical services only.
This setting tells the operating system that the selected application has high priority. Algorithms Doze Mode and App Standby will stop putting the processes of this app to sleep when the screen is off. This ensures stable delivery of push notifications and the operation of background services, such as recording tracks or geolocation tracking.
If you cannot find the “Battery optimization” item in the general menu, try searching in the settings by entering the word “battery” or “power.”
Locking applications in RAM (Lock Apps)
Another powerful tool available to the user is the function of pinning applications to RAM. Unlike tuning the battery, this method works at the task manager level. When you pin an application, the system cannot terminate its process even if there is an acute shortage of free memory (RAM) or when using the Clear All function.
To activate this function, first open the recent applications menu. This is done by swiping up from the bottom and holding (on smartphones with gesture navigation) or by pressing the corresponding touch button. Find the card of the desired application in the list. Depending on the device model, the actions may vary:
- 🔒 On Samsung devices: click on the application icon at the top of the card and select “Lock”.
- 📌 On Xiaomi and POCO smartphones: pull the application card down until the lock icon appears.
- ⬆️ On pure Android and many other skins: hold your finger on the application card and select “Lock” or “Pin.”
After completing this procedure, a small lock icon will appear next to the application icon. Now, even if you press the clear memory button, this application will remain running. This is an ideal option for music players or voice recorders that you launch occasionally, but want to be sure that they will not be unloaded from memory accidentally.
It is worth considering that pinning an application does not give it complete immunity from system reboots. If you reboot your smartphone manually or the device reboots due to an update, the pinning will be reset and you will have to repeat the procedure. However, for everyday use, this is one of the most reliable ways to keep the service in RAM.
Using the developer menu to control processes
For advanced users for whom the standard settings are not enough, there is a developer menu. This hidden section of the system provides access to low-level memory and process management options. Here you can strictly limit the number of background processes or, conversely, remove some restrictions imposed by the system.
To get to this menu, you must first activate developer mode. Go to Settings → About phone and find the item “Build number”. Quickly click on it 7 times in a row until the message “You have become a developer” appears. After this, a new section will appear in the main settings For developers.
Inside this section we are interested in the parameters related to background activity. Find the "Background process limit" item. By default, the value is “Standard Limit”. You can choose the option "No background processes" (strongly not recommended for normal use) or set a limit, such as "No more than 4 processes." However, paradoxically, sometimes changing this parameter and returning it back to the “Standard” value helps reset erroneous cached system settings.
⚠️ Warning: Incorrectly setting parameters in the developer menu can lead to unstable system operation, interface freezes, or rapid battery drain. Change the values only if you understand their purpose.
Also in the developer menu, you should pay attention to the “Do not save actions” switch. If it is active, the system will destroy application activity as soon as the user leaves it. Make sure this item disabled. In addition, the “Background Scan” function must be active for many services to work correctly, although it consumes resources.
What is “Window Animation” in the developer menu?
This is a parameter responsible for the speed of drawing transitions between screens. It does not affect the operation of background applications, but disabling it (setting the value to 0.5x or Off) can visually speed up the interface on older devices.
Specifics of manufacturers' shells (MIUI, EMUI, OneUI)
Chinese smartphone manufacturers are known for their extremely aggressive approach to memory management. Xiaomi's MIUI, Huawei's EMUI, and OPPO's ColorOS often have their own task managers that ignore the default Android settings. Even if you have disabled battery optimization, the built-in “Cleaner” can terminate the application process.
Owners of Xiaomi and Redmi devices need to go to the “Security” application (green icon with a lightning bolt). Inside, find the "Manage Applications" or "Permissions" section. Here you should find the “Autorun” item and enable it for the desired apps. Without this permission, the application will not be able to start its services after rebooting the phone or clearing the memory.
Additionally, MIUI has a hidden protection mechanism. Go to the battery settings, select the desired application and set the power saving mode to “No restrictions”. This is a critical step, since the standard “Battery Saver” mode in MIUI kills background processes much faster than in stock Android.
| Manufacturer | Manager name | Key setting | Where to find |
|---|---|---|---|
| Xiaomi / POCO | Security | Autostart | Security application → Permissions |
| Samsung | Device Care | Sleep applications | Settings → Battery → Background restrictions |
| Huawei / Honor | Phone manager | Launch applications | Settings → Battery → Launch applications |
| OnePlus / OPPO | Phone manager | Allow autorun | Settings → Battery → Advanced |
Samsung users should pay attention to the “App Sleep” and “Deep Sleep” functions. If a app falls into these lists, it will not run in the background under any circumstances. You need to remove the necessary messengers or trackers from the lists of sleeping applications, adding them to the “Applications that never sleep” section.
On smartphones from Chinese brands, standard Android settings are often not enough - be sure to check the built-in proprietary memory and startup managers.
The impact of the power saving mode on background work
Power Saving Mode is the number one enemy for background applications. When this mode is activated, the system forcibly limits the processor frequency, reduces the screen brightness and, most importantly, blocks background data transfer and services to save battery.
There are several levels of saving: normal power saving mode and Ultra (or Maximum Saving) mode. In normal mode, the system may simply slow down data synchronization. In “Ultra” mode, the phone essentially turns into a “dialer”, leaving only basic functions active: calls, SMS and, sometimes, one selected messenger. All other applications will be stopped immediately.
If you need an application to run in the background, make sure that power saving mode is turned off. Also check the settings for automatic activation of this mode. Often, users accidentally set the energy saving mode to turn on when the charge is 50% or 30%, which makes it impossible for the navigator or fitness tracker to work in the afternoon.
Some manufacturers allow you to create exceptions even for the energy saving mode. In the battery settings, look for the item “Power saving mode exceptions” and add critical applications there. This will allow them to work even when the general saving mode is active, although it will consume power faster.
⚠️ Attention: Battery settings interfaces are constantly changing with Android updates. If you do not find the described items, check the current menu structure in the official help of your phone model.
☑️ Check energy saving settings
Solving problems with background data transfer
Even if the application is not closed by the system, it may not work correct due to network connection limitations. Android allows you to prevent apps from using mobile data or Wi-Fi in the background. This is often done by the user accidentally in an attempt to save bandwidth.
To check these settings, go to Settings → Applications → [Selected application] → Mobile data and Wi-Fi. Make sure the Background switch is active. If it is turned off, the application will only be able to go online when it is open on the screen. For instant messengers and email clients, this is a fatal setting.
It is also worth checking the background data transfer limit in global network settings. Path: Settings → Network and Internet → Data usage → Traffic saving. If traffic saving is enabled, the system blocks the background Internet for all applications except those added to the exception list (“Unrestricted Access”). Add your important services to this list.
The “Smart Wi-Fi” or “Switch to mobile network” setting deserves special attention. Some phones turn off Wi-Fi when the screen goes dark to save power. This causes the connection to be dropped for background applications. In the advanced Wi-Fi settings, find the item “Keep Wi-Fi on in sleep mode” and select “Always.”
For applications that require constant geolocation (taxi, tracking), in the permission settings, be sure to select the option “Always allowed” and not “Only when in use.”
Frequently asked questions (FAQ)
Why does the application close immediately after minimizing, despite all the settings?
This may be due to a lack of RAM. If the phone has little free memory, the system will unload even pinned applications (except those locked with a lock). Also check to see if Developer mode is enabled to limit background processes.
Does clearing the cache affect background apps?
Clearing the cache (the cache data itself) does not close the application, but if you click the "Stop" button in the application settings or use an aggressive "Cleaner", the process will be completed. The cache can be cleared safely, the process will not be affected if you do not press the forced stop button.
Is it possible to completely prohibit Android from closing any applications?
It is impossible to completely prohibit it without obtaining root access and installing special modules (for example, through Magisk). The system limitations of the Linux kernel on which Android runs will always strive to free up memory when there is a critical lack of resources, so that the entire system interface does not crash.
Why do applications work worse in the background on the new Android 12/13/14?
With each version, Google tightens its policy for working in the background to protect privacy and battery. Restrictions have been introduced on running services in the background and accessing location. The only solution is to carefully configure exceptions in the battery menu and permissions for each specific application.
Are background settings reset after rebooting the phone?
Battery optimization and permission settings are saved after reboot. However, pinning apps to the recent tasks menu (lock icon) usually resets. Autorun in Chinese shells (MIUI, etc.) should be preserved if it is enabled in a special menu.