Almost always, Android's battery saving or your phone maker's own layer closes the VPN app in the background. Three settings fix it on most phones: remove battery restrictions for the VPN app, turn on Always-on VPN with Block connections without VPN, and on some brands allow the app to start by itself. The steps for your brand are below.
You connect in the morning, lock the phone, and at lunch the key icon is gone. No error, no warning: the VPN simply isn't running any more. It's one of the most common VPN complaints on Android, and it's rarely the VPN's fault. It's the battery saver doing its job a little too well.
Why Android closes your VPN
Android saves battery in two layers.
- Android itself has Doze and App Standby. When the phone sits still with the screen off, Android defers background work and cuts network access for apps it considers idle, waking them only in short maintenance windows. The Android developer documentation describes both.
- Your phone maker often adds its own, stricter layer on top: lists of "sleeping" apps, automatic optimization, auto-start blocking. Some of these close apps outright after a while in the background.
A VPN is exactly the kind of app these systems target: it runs all the time and uses the network. The difference is that when a VPN is stopped, your traffic doesn't wait. Unless you've told Android otherwise, your apps quietly go back to the normal connection, unprotected.
The three settings that fix it on most phones
1. Remove battery restrictions for the VPN app
Open Settings › Apps, pick your VPN app, open its battery settings and choose Unrestricted (on some phones called "No restrictions" or "Don't optimize"). This tells both Android and most manufacturer layers to leave the app alone.
2. Turn on Always-on VPN and Block connections without VPN
Open Settings › Network & internet › VPN (on Samsung: Settings › Connections › More connection settings › VPN), tap the gear next to your VPN and turn on:
- Always-on VPN: Android starts the VPN when the phone starts and restarts it if it stops.
- Block connections without VPN: while the VPN isn't connected, apps get no internet at all instead of using the normal connection.
This is Android's own kill switch, and the most reliable one there is. Our Kill Switch help article lists the few exceptions Android itself has.
3. Allow auto-start, on brands that have it
Some manufacturers block apps from starting in the background unless you allow it. If your phone has an Autostart or Auto-launch setting, turn it on for the VPN app.
Where to find the settings on your brand
Menu names change between brands and Android versions, so look for the same words if yours differ.
| Brand | Where to look |
|---|---|
| Google Pixel, Motorola and most others | Settings › Apps › the app › App battery usage › Unrestricted |
| Samsung Galaxy | Settings › Apps › the app › Battery › Unrestricted, then add it to Never sleeping apps (on newer versions, Never auto sleeping apps). Step by step: our Samsung guide |
| Xiaomi, Redmi, POCO | The app's Battery saver set to no restrictions, and Autostart on |
| OPPO, realme, OnePlus | The app's battery usage: allow background activity and auto launch |
| Honor, Huawei | App launch: turn off automatic management, allow auto-launch and running in the background |
Our battery help article keeps the current menu paths for more brands, including vivo, Tecno, Infinix and itel.
How to tell whether Android closed the VPN
- The key icon in the status bar is gone, and the VPN's notification has disappeared.
- Messages or notifications arrive late while the screen is off. The same battery settings are usually behind this.
- The VPN app shows it's disconnected, but you never tapped Disconnect.
PryVPN notices when the system closed it, rather than you, and tells you once, with the steps for your phone.
Does a VPN drain the battery?
A VPN does use some battery: it encrypts all your traffic and keeps a connection open. WireGuard is light on both counts. In PryVPN's case:
- While disconnected, it does no background work at all.
- While connected, it sends a tiny keep-alive packet every 25 to 55 seconds so the connection stays open through routers and firewalls.
- Android may still list it high in battery usage, because the encryption work for all your other apps is counted against the VPN. That would happen with any VPN.
Setting the app to Unrestricted doesn't make it use more battery by itself; it only stops Android from killing it.
Other reasons a VPN drops
- A Wi-Fi login page. Hotel and café networks sometimes sign you out and hold all traffic until you sign in again. See our help article on Wi-Fi login pages and the one on hotel Wi-Fi blocking VPNs.
- Switching networks. Moving from Wi-Fi to mobile data briefly changes the path. A good app reconnects in seconds.
- Another VPN app. Android allows one VPN at a time; starting another one stops the first.
- An Android update. After some updates to Android 16, nothing connects until Always-on is toggled; our Android 16 help article has the fix.
Frequently asked questions
Why does my VPN disconnect only when the screen is off?
Because that's when Android's Doze and the maker's battery saver kick in. Remove the battery restrictions for the VPN app and turn on Always-on VPN.
Is Always-on VPN safe to leave on?
Yes. It's an Android system feature built for this. With Block connections without VPN also on, a dropped VPN means no internet rather than unprotected internet. You'll need to turn it off to use your normal connection.
Do I have to redo this after every update?
Usually not. If disconnections come back after a system update, check the battery setting first, then Always-on VPN.
PryVPN tells you when Android has closed it and walks you through these settings for your phone. If you'd like to try it, join the beta.
Sources
- Android developers: Optimize for Doze and App Standby
- Android developers: VPN (always-on VPN and blocking connections without VPN)
- Android Help: Connect to a virtual private network (VPN) on Android
- Samsung: Sleeping apps on your Galaxy device
- Don't kill my app: how phone makers restrict background apps (community reference)
Spotted a mistake? Write to support@pryvpn.com and we'll fix it and update the date.