In some cases, apps won't stay in the background ("alive" or in a sleep mode) due to Android OS optimization function, or so called "battery save mode" — this function can kill background applications. It may be inconvenient to relaunch them each time they are getting closed. To avoid the background app termination you need to follow these steps which we described separately for each manufacturer (version) of Android OS. Note that instructions for different manufacturers are mostly very similar.
List of manufacturers with different versions of Android OS:
Information on Asus devices is still far from being exhaustive so there may be more issues than listed here. We're going to update this part of the article when we know more.
Go to Settings - Power Manager - Mobile Manager - Settings - Battery-saving options - Auto-start nanager - AdGuard - uncheck.
To set up AdGuard's background work for Xiaomi devices you should pay attention to Battery and Permissions.
Go to "Battery"
Select "battery saver" app
Find and select AdGuard
Go to "Permissions"
For Samsung devices, there is no huge need for setting up the background work, but if in your case the application is getting closed or disappears from the recent tasks after a while, do the following:
Tap on the Recent tasks button, tap on the Additional settings icon. It should look like this:
Tap on Lock Apps:
Huawei devices are the easiest to set up, it is enough to perform two simple steps to lock the application in the background so it won't be terminated by battery saving or background killer process.
Tap on the Recent tasks button:
Tap on the lock icon:
Besides, to set up the background work of your app more effectively, you should open device settings and do the following:
And here are some specific settings for different Huawei devices:
Open device settings > Apps > Settings > Special access > choose Ignore battery optimization > select Allow for your app.
Open device settings > Battery > App launch > then set your app to Manage manually and make sure everything is turned on.
Meizu has almost the same approach to the background process limitations as Huawei and Xiaomi. So you can avoid disabling the background work of AdGuard and any other app by adjusting the following settings:
Nokia on Android O and P disables any background process after 20 minutes if the screen is off.
Here is what you need to do in order to prevent killing the background process of your app:
From now on, background apps are supposed to work smoothly and use the standard Android battery optimizations.
There is an alternative solution for background work optimization which is more appropriate for advanced users. You will find the instructions below.
pm uninstall --user 0 com.evenwell.emm
pm uninstall --user 0 com.evenwell.powersaving.g3
Sometimes background services are being killed (including accessibility services, which then need re-enabling) every time you turn the screen off. So far, a workaround for this is:
Go to “Security Centre” - tap on "Privacy Permissions" - "Startup manager" and allow AdGuard app to run in background.
Devices with OxygenOS on board are the most problematic, with its OS-sepcific cache cleaning and free RAM, including OS optimization. In addition, OxygenOS can interrupt the application's work if you do not use it for a while. To avoid these unwanted consequences, follow these steps:
Go to Settings
Battery - Battery optimization
Find the app you want to keep awake all the time
Tap on it and select "Don't optimize" option
Tap "Done" to save
Open recent apps menu (as showed on this screenshot):
On some OnePlus phones there is also a thing called App Auto-Launch and Deep Optimisation which essentially prevents apps from working in the background. Please disable it for your app.
And here is one more thing to try:
Open device settings > Battery > Battery optimization > switch to the All apps list (top menu) > choose your app > activate Don’t optimize
Sony was the first mobile OS developer to introduce non-standard background process optimization and opened Pandora’s box. It is called Stamina mode and it instantly breaks all background processes and all alarms if enabled.
Go to Settings - Battery - Three dots in the top right corner - Battery optimisation - Apps - AdGuard - uncheck
Wiko devices are definitely problematic in terms of non-standard background process optimizations and adjustments to the settings that need to be done to make apps work properly.
Android stock OS normally does not conflict with applications working in the background, but if you are facing any issues you will need to switch on the "Always on VPN" mode.
Go to Settings - Network and Internet
Tap on "VPN" and choose AdGuard
Set up "Always on VPN" mode