Why Xiaomi is closing apps in the background and how to fix it
Xiaomiβs MIUI-based smartphones are known for aggressive power optimization, which often leads to forced closure of applications in the background, including instant messengers (Telegram, WhatsApp), navigators (Yandex.Maps, Google Maps), fitness trackers and even system services. The manufacturer motivates this by increasing battery life, but for users this behavior often becomes a problem: missed notifications, download breaks or loss of progress in games.
In this article, weβll break down 5 working ways to keep apps active in the background, including hidden MIUI settings that are not obvious even to experienced users. All methods have been tested on the latest firmware versions (MIUI 14 and MIUI 15) and are relevant for models from Redmi Note 12 to the flagship Xiaomi 14 Ultra. Itβs important to understand that some restrictions are imposed not only by MIUI itself, but also by Android 13/14 policies β weβll talk about this too.
Method 1: Setup autostart and background activity
The most basic, but often ignored, method is to enable autoruns and permissions for background work, which MIUI blocks by default for most applications other than system ones, to activate:
- Open Settings β Applications β Application Management.
- Select the application you want (for example, Viber or 2GIS).
- Go to the Permissions section and enable: π Auto-Run (allows the application to start when the phone is turned on) π± Background activity (allows work in the background) π Show notifications (important for messengers)
Battery
No restrictions.
After these steps, the application will be able to stay in memory longer, but some models (such as POCO F5) may need additional configuration through the Developer Settings - read about this in the next section.
βοΈ Checklist for auto-start
Method 2: Disable battery optimization through developer settings
If standard permissions didn't work, the reason might be deep optimization of MIUI, which is hidden in the developer menu, to turn it off:
- Activate Developer Mode by tapping 7 times on the MIUI version in Settings β About Phone.
- Back to Settings β Additionally. β For developers.
- Find and disconnect: π Optimization MIUI Battery (complete shutdown of aggressive control) β‘ Background activity check (prevents forced closure) π Limitation of background processes (set the standard limit value)
β οΈ Warning: Disabling battery optimization completely can reduce battery life by 10 to 15 percent, and we recommend using this method only for mission-critical applications (e.g., health trackers or enterprise messengers).
Method 3: Fixing the application in multitasking (for Android 12+)
Starting with Android 12, MIUI introduced the feature of "pinning" applications in the multitasking bar, which prevents them from being closed by the system, even for applications that are usually aggressively optimized (for example, TikTok or Instagram).
- Open Recent Apps (swipe up with a delay).
- Find the right application and make a long press on his card.
- In the menu that appears, select Secure (icon with a pin) π).
The attached app will be marked with a pin and won't close until you do it manually.
- π΅ It only works for one application at a time (on most models).
- π After restarting the phone, the fixing is reset.
- β οΈ Some system applications (such as the Camera) cannot be fixed.
π‘
If the βSecureβ function is missing, update the MIUI to the latest version or check the gesture settings in System β Gestures β Recent applications.
Method 4: Use ADB-deep-tuning commands
For advanced users who have not been helped by previous methods, there is a way to disable optimization through ADB (Android Debug Bridge), which allows you to manually add an application to the system whitelist.
Instructions:
- Install Platform Tools on your PC.
- Connect your phone via USB, enable debugging via USB in Settings β For developers.
- Open the command prompt (Windows) or terminal (macOS/Linux) and type: adb shell dumpsys deviceidle whitelist +com.example.app Replace com.example.app with your application's batch name (e.g. org.telegram.messenger for Telegram).
- To apply the changes, restart the phone.
To find the batch name of the application, use the command:
adb shell pm list packages | grep "appendix name"β οΈ Attention: Misuse of the right ADB-Don't whitelist more than 3-4 apps at once, which will lead to increased battery consumption.
How to find out the batch name of the application without ADB?
Method 5: Alternative solutions for specific applications
Some apps have built-in mechanisms to circumvent MIUI restrictions, and here's what you can do for popular services:
| Annex | Problem. | Decision |
|---|---|---|
| No notifications coming. | Enable Display Notifications and Autoload Media in Chat Settings | |
| Google Maps | Navigation's breaking down. | In the application settings, turn off Traffic Optimization and turn on Exact Mode |
| Spotify | Music stops. | In Spotify settings, enable Auto-play and turn off Data Savings |
| POCO Launcher | Widgets closing | Install Nova Launcher β it works better with background processes |
For games (such as Genshin Impact or PUBG Mobile), we recommend using the game accelerator mode (Settings β Special Features β Game accelerator).
π‘
For instant messengers (Telegram, Viber), additionally configure the synchronization of contacts and turn off the "Traffic Saving" in their internal settings.
Frequent Mistakes and How to Avoid Them
Many users make the same mistakes when setting up background work, which leads to the opposite effect.
- π« Enable βNo Limitsβ for all applications β this will reduce battery life by 30-40%.
- π« Use "memory cleaners" (e.g. Clean Master) - they kill background processes forcibly.
- π« Disable all Google services through Settings β Google β Google Play Services β This Will Break Notifications.
- π« Install βoptimizersβ from the Play Market β most of them are fraudulent.
If after all the manipulations the application is still closed, check:
- Is the Power Saving Mode (Settings β Battery) enabled?
- Does the application block antivirus (for example, Avast or 360 Security)?
- Is there a beta version of MIUI installed β they often have bugs with background processes.