If Android closes VilaNet after you switch apps or lock the screen, the phone's battery saver is usually stopping the background process. This is common on phones sold in mainland China. If the app closes the moment you tap Connect, see VilaNet crashes when you tap Connect.
Request an exemption in VilaNet first
- Open Settings > Connection > Background Protection.
- Tap Request Exemption so battery optimization is turned off for VilaNet.
- Turn on Auto-Reconnect under Settings > Connection. A new install leaves it off, and so does a reinstall. You have to turn it on. An update does not turn it off: if it was already on, it stays on.
- In the Auto-Reconnect section, tap Open VPN Settings. That opens Android's VPN settings. Turn on Always-on VPN for VilaNet. This system switch exists only on Android. With it on, the VPN stays connected even after you restart the phone.
Background Protection shows a green shield when the app is already protected, and an orange battery icon when it is not. After step 2 it should show the green shield.
You can also tap Background Protection Guide in the app for the steps on your phone. Samsung's full system steps are in VilaNet is crashing on Samsung devices. OPPO is in VPN apps frequently disconnect on OPPO phones. The table below is for other brands.
System settings by brand
| Brand | In the phone settings |
|---|---|
| Xiaomi, Redmi, POCO | Apps > Manage apps > VilaNet > Battery saver > "No restrictions". Turn on "Autostart". |
| Huawei, Honor | Battery > App launch > VilaNet > turn off "Manage automatically", then enable all three options. |
| OnePlus, Realme | Battery optimization > VilaNet > "Don't optimize". Turn VilaNet on in autostart management. For OPPO, use the OPPO article above, not this row. |
| vivo, iQOO | Background power consumption > allow VilaNet. Turn on "Autostart". |
| Nokia, HMD | Turn off Adaptive Battery. Set VilaNet to "Unrestricted". |
| Tecno, Infinix, Itel | Phone Master > allow VilaNet to autostart. Turn off Power Boost. Lock VilaNet in recent apps. |
| TCL, Alcatel | Smart Manager > allow VilaNet to autostart. Turn off the power-saving modes. |
How to tell it worked
- Background Protection shows the green shield.
- Auto-Reconnect is on.
- After you switch apps or lock the screen for a few minutes, VilaNet still shows Connected in blue, and a browser still opens pages.
- After a phone restart, with Always-on VPN on, VilaNet stays connected.
Still not working?
- On Samsung, finish the battery and sleeping-app steps in the existing article, then check that the shield is green.
- On OPPO, finish the recent-apps lock, battery allowance, and autostart steps in the existing article, then check the shield.
- If the shield is green, Auto-Reconnect is on, and the system still closes VilaNet after you lock the screen, open Contact Support in the Menu, leave Include app diagnostics on, and include the brand, model, and whether it drops only after lock or as soon as you switch apps. You can also open a ticket. Install steps are in the VilaNet Android guide.