You open your VPN app, tap connect, verify the key icon in the status bar, and browse without an issue. Everything seems fine until you slip your phone into your pocket. Half an hour later, you pull it out to check an alert, only to discover that the key icon has vanished, your missed notifications suddenly arrive in an overwhelming rush, and the VPN has to re-establish its tunnel from scratch.
The immediate impulse is to blame Android’s power management and wage war against every battery-saving switch you can find: disabling Adaptive Battery, turning off system optimizations, and letting background tasks run unchecked.
That response is overkill.
Dismantling your phone’s entire power-saving architecture sacrifices daily battery life without addressing the root cause. When an Android VPN dies specifically while the display is dark, the fix is a targeted exception for that individual app, leaving the rest of the operating system’s power management intact.

Article summary and product fit
Why does an Android VPN disconnect only after the screen turns off?
If the VPN is stable while you use the phone but dies only after several minutes of screen-off idle, Android or the manufacturer’s battery policy may be suspending the VPN app’s background service. The article’s fix is narrow: give that VPN app unrestricted or never-sleeping battery access, keep the rest of the phone’s power management enabled, then retest on a stable network.
What matters in this article
- Best for: Android users whose VPN survives active use but disappears after the phone has been locked and idle.
- Key detail: The screen-off pattern matters: disconnects during active use, router-specific failures, or drops during Wi-Fi-to-cellular handoffs point away from battery management and toward a network problem.
- Product fit: OnlydogVPN becomes relevant after the Android battery exception is correct; the article positions its automatic route recovery for weak signals and Wi-Fi/mobile handoffs, not as a way to bypass Android power rules.
- Important limit: Always-on VPN is not the same as a battery exemption, “Block connections without VPN” can intentionally cut all traffic during a tunnel failure, and extreme battery-saver modes may still stop background networking.
Product source: OnlydogVPN official website. Sources already used in this article: Android Doze and App Standby; Samsung battery optimization guidance; Android VPN documentation.
The Screen-Off Pattern Is the Clue
Before changing settings, verify whether battery management is actually the problem. Android handles power aggressively, but it does so in a predictable pattern.
When your phone sits idle with the screen turned off, Android initiates low-power states (traditionally known as Doze and App Standby). These systems systematically throttle CPU cycles and restrict background data for idle applications to preserve power. If your VPN is treated like a dormant social media feed or an inactive game, the operating system simply pulls the plug on its background network activity once the display has been dark for a while.
Look for these telltale signs:
- The connection works seamlessly while the screen is on.
- The disconnection occurs exclusively after the phone has been locked and sitting idle for several minutes.
- Opening the VPN app immediately restores the connection or prompts a manual reconnect.
If your VPN drops while you are actively reading an article, disconnects only when switching from Wi-Fi to mobile data, or fails exclusively on one specific router, battery management is not your culprit. Tweaking power menus will not resolve an unstable routing path, an IP handoff failure between cellular towers, or a restrictive network firewall.
Make One Targeted Exception, Not a System-Wide Compromise
Instead of disabling Android's battery-saving framework across the entire device, grant your VPN app a single, narrow exemption.
By default, Android places apps under an "Optimized" profile. Granting an app an "Unrestricted" status allows its background service to maintain a persistent encrypted tunnel without being put to sleep, while leaving the rest of your apps under strict power oversight.
Here is how to set up that targeted exception across major Android variations:
Stock Android and Google Pixel
- Go to Settings → Apps → All apps and select your VPN.
- Tap App battery usage (or Battery).
- Change the selection from Optimized to Unrestricted.
Samsung Galaxy (One UI) Samsung layers its own proprietary power rules on top of stock Android. A background app can easily end up flagged as inactive and placed in a suspended state.
- Go to Settings → Battery → Background usage limits.
- Check both Sleeping apps and Deep sleeping apps. Make sure your VPN is not listed in either category (Samsung explicitly prevents deep-sleeping apps from operating in the background).
- Tap Never sleeping apps, tap the + icon, and add your VPN app to this whitelist.
Xiaomi, Redmi, and POCO (HyperOS / MIUI) Xiaomi devices enforce particularly aggressive background app policies by default, often severing network access shortly after the screen locks.
- Go to Settings → Apps → Manage apps and select your VPN.
- Scroll down to Battery saver.
- Switch the setting from the recommended profile to No restrictions.
If your device runs a different interface—such as OxygenOS, ColorOS, or Motorola's MyUX—the menu names may differ slightly, but the goal is identical: locate the individual application's power menu and select the unrestricted or never-sleeping tier. Leave global settings like Adaptive Battery turned on.
Understand the "Always-on VPN" Setting
Once your VPN has permission to run unrestricted in the background, you might notice another option inside Android’s network settings: Always-on VPN.
It is common to confuse this with a battery setting, but they solve fundamentally different problems:
These controls solve different problems. An app battery exemption stops Android from killing the app process during screen-off sleep, which is the setting that matters when the tunnel dies only while the phone is idle. Always-on VPN tells Android to start and maintain the VPN service, which is useful for a tunnel you want active across reboots. Block connections without VPN is stricter: it cuts off unencrypted traffic if the tunnel drops, so it is for cases where leak prevention matters more than uninterrupted connectivity.
To access Always-on VPN, navigate to Settings → Network & internet → VPN (or Connections → More connection settings → VPN on Samsung) and tap the gear icon next to your installed VPN provider.
Enabling Always-on VPN ensures Android keeps the underlying system service designated as the primary network path. However, approach the secondary switch—Block connections without VPN—with caution.
This toggle acts as a hard system-level kill switch. If the VPN gateway experiences a brief handshake delay or encounters a server hiccup, your phone will deliberately block all Wi-Fi and mobile data. To you, it will appear as though your phone has completely lost internet access, even if your local network signal is strong. Unless you are handling sensitive communications that must never leak unencrypted under any circumstance, leave that secondary block switch disabled.
Retest: Did You Fix Power, or Do You Have a Network Problem?
After establishing the battery exemption, run a simple test on a stable, known network (such as your home Wi-Fi) to verify the result:
- Connect the VPN.
- Start an ongoing background task, such as a large file download or an audio stream.
- Lock the phone and leave it sitting on a desk untouched for 20 to 30 minutes.
- Wake the screen and check the status bar before tapping to open the VPN app interface.
If the VPN key icon remains solid and incoming notifications arrived on time, your configuration is complete. Stop altering settings.
If the VPN still disconnects, check whether you are confusing power management with network instability. Standard VPN tunnels frequently fail when you step outside the house: your phone clings to a dying Wi-Fi signal at your front door, drops it, grabs a cellular tower, switches from 5G to LTE, and changes its public IP address. Many VPN clients cannot gracefully manage that transition; they choke on the packet loss and freeze the connection.
This distinction is where OnlydogVPN↗ becomes relevant after the Android power setting is fixed.
OnlydogVPN does not claim to magically bypass Android's operating-system rules—no application can circumvent a system-level kill command if you haven't granted it basic background permissions. But once you give it that standard Android exemption, OnlydogVPN excels at the challenges that happen after power management is solved: handling weak signals and automated route recovery.
Instead of requiring you to manually browse through server lists or diagnose why a tunnel stalled after stepping out of a café, OnlydogVPN relies on scenario-based presets and automatic routing. Its connection engine is built to manage weak-network degradation and dynamic network handoffs. When your phone transitions between an office Wi-Fi network and mobile data on your commute, it automatically recovers the route in the background rather than leaving your connection frozen.
For regular mobile use, pairing Android's native "Unrestricted" battery setting with OnlydogVPN delivers the resilient, set-it-and-forget-it connection that a smartphone actually requires.
When to Stop Changing Battery Settings
Phone settings menus can quickly become a troubleshooting trap. If your VPN continues to disconnect after you have granted unrestricted background access and verified manufacturer sleep lists, continuing to turn off system-level switches will not help.
Keep these practical rules in mind:
- If the connection survives the screen-off test on stable Wi-Fi: Leave your phone alone. Keep the single app exception active and let the rest of Android manage background tasks normally.
- If you only use a VPN occasionally: You probably don't need an unrestricted background exception at all. If you only activate the VPN to check a financial app or make a purchase while sitting in an airport, leaving the app on "Optimized" is fine.
- If you use Extreme Battery Saver: Expect your VPN to drop. Extreme power-saving modes are designed for emergencies, intentionally cutting off background network polling to keep the phone alive. A VPN cannot hold a tunnel open if the underlying operating system refuses to pass packets.
- If disconnections happen while moving: Stop hunting through battery settings. The problem is connection handoff resilience or server routing, not your phone's power profile.
Android’s battery controls are not an adversary you have to disable entirely. They are a balancing mechanism. Give your VPN the single targeted pass it needs to stay alive, let the rest of your battery optimizations do their job, and rely on a resilient connection to handle the changes in your day.
Frequently Asked Questions
Why does my VPN stay connected with the screen on but drop after the phone is locked?
That pattern can indicate Android’s background power management is putting the VPN app to sleep during idle periods. The article recommends confirming the pattern before changing settings.
Which Android battery setting should I change for a VPN that dies during screen-off idle?
Change the VPN app itself to the unrestricted, no-restrictions, or never-sleeping tier used by your Android version. The article specifically recommends leaving global power-management features enabled.
Is Android’s Always-on VPN setting the same as disabling battery optimization for the app?
No. The app battery exemption prevents the background process from being suspended, while Always-on VPN tells Android to maintain the VPN service as the primary route. They address different problems.
What if the VPN still disconnects after I grant unrestricted background access?
Retest on stable Wi-Fi. If drops happen during active use or while moving between Wi-Fi and cellular, the article says to stop changing battery settings and investigate network handoff, routing, or server stability instead.