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:
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
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
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