Android operating systems do provide an always on and leak blocking VPN functionality per-profile. We close out many more VPN leaks than the stock OS does too. Providing the app is well designed it should continue to stay running. Orbot was known to be terrible with this (tons of bugs) and had crashes on our exploit mitigations. If it ever got a recommendation then it only would have been because there was little other options.
The per-profile VPN helps segregate networks like this easily. You could run a VPN on a standard user and an anonymity network in the profile's Private Space and you can switch to both with ease.
Login to reply
Replies (3)
Is the always-on policy just for VPNs or are there other exceptions?
App developers constantly run into issues to keep things running. For instance, in Nostr, we would like to keep an always on connection with the user's chosen Inbox relays at all times, replacing the Push Notification stack (FCM/UnifiedPush) altogether. Though I am not sure if we were successful in keeping that service running at all times, from a regular app, yet.
I wouldn't know details without knowing more from your app.
Check out the documentation on background tasks, or if you discussed it elsewhere with a different team member then what they said should be helpful to you.


Android Developers
Background tasks overview | Background work | Android Developers
but this always-on feature is designed for VPNs, yes. you can background apps using the method I sent above.