The fuss is that 3rd party apps need a persistent notification to stay alive. But, because Google owns pixels, it can skip that step and be less intrusive/visible, which others can not.
The WireGuard and tailscale apps work great for me without a persistent notification.
WireGuard doesn’t support notifications at all.
Tailscale does and by default it shows a persistent notification but you can just silence it or turn it off in the apps notification settings.
Persistent notification thus seems to be unnecessary for VPNs to function, Google/Android dev documentation recommends a persistent notification for the UX but it’s not needed.
https://developer.android.com/guide/topics/connectivity/vpn
In conclusion it appears that third party apps can indeed provide a VPN service without a notification.
Unfortunately, that will mean your app can be killed on many smartphones from device makers like xiaomi, Oppo, and huawei, which have aggressive battery optimization. I had this issue on a redmi device where background apps would be killed unless a permanent notification was present.
The WireGuard and tailscale apps work great for me without a persistent notification.
I haven’t tried wireguard. But, I should give them a try and see how it goes in samsung.
The ranking may make it sound like samsung is the worst. But that’s not been the case since android 12. I do not have app reload or app killing issues on this one and find it much better than what I used to experience on miui.
I published an app on the play store that purely relies on a persistent notification + wakelocks to keep the screen active (since the whole point of the app is to keep the screen awake) - Samsung was definitely the worst when it comes to this for my app, as I would receive endless support emails about people with Samsung devices where it would get killed, even when disabling battery optimization for my app. The other manufacturers listed there came up every now and then, but disabling battery optimization generally did the trick for them.
With there being nothing that I could do for my app, I tried disabling compatibility in the play store for a ton of Samsung models, but then I got even more emails about people wondering why it wasn’t available anymore so I re-enabled it, but to this day there’s still (AFAIK) zero things I can do to prevent the app from getting killed on those devices.
It’s called “Caffeinate” (I’m avoiding posting the direct link just so I don’t break any self promotion rules), I made it in the Android 7 days when the quick settings Tile API came out to replicate the similar tile that was available in CyanogenMod. It ended up getting way more downloads than I ever expected honestly - I just wanted to try the new API haha.
I know that Caffeinate itself doesn’t use up a lot of RAM (the only thing it does when its active is create a persistent notification and creates a wakelock in order to keep the screen active), but perhaps the lower end Samsung device models just have less RAM available, so opening a browser or such kills it.
I tried your caffeinate app. The last time I checked, it was using 32mb while running. Currently, using 11mb. Android says it uses an average of 143kb with a maximum of 7.8mb for the whole day.
It has been installed for the past 3 days, and I try it once a day from the drop-down tile. It hasn’t been killed or reloaded yet.
I have 6GB of ram with 6GB of ram plus enabled. I guess its low ram and cpu usage make it never likely to be booted off ram. Those users who complain must be using Samsung devices on older oneui and / or low ram like 3GB or 4GB.
Depends on how much RAM your device has. My tablet definitely kills background tasks for no good reason, but it’s a mid tier one so I half expected it.
I was under the impression that the “Disable battery optimisations” feature was to prevent exactly this. Maybe I misunderstood what it does, but a bunch of apps designed to run in the background tell you to disable this functionality for their app for this very reason.
That is for applications that need access to a LOCAL_SERVICE while not in foreground. That’s like Geolocation or screen orientation. VPN is not one of those. You can kill the foreground application from the recent apps by sliding up.
No real VPN app needs to have an application window and a background service (same thread) running to provide a VPN. If it does, it is doing something else not related to VPN.
If you want to add a pause button, applications can add custom tiles.
Persistent notification was added in response to android 8+ background restrictions. You didn’t need it before.
Apps that need to be constantly alive do that to avoid being killed by the system on android devices that are not stock or pixel. Apps like tasker, accubattery, Internet speed meter, adguard all target the latest android version 12 or higher.
We are on android 14. You can not install apps targeting android 5 from the playstore today.
If they’re targeting modern Android, they can simply direct the user to the Battery settings panel where one can set the app to run arbitrarily in the background. No notifications are needed.
I checked playstore reviews of wireguard, and people are complaining that wireguard stops working after a while. Which makes me think. For wider compatibility and persistent background tasks, you do need one to stay alive.
Perhaps, but this article is specifically about the Pixel which, to my knowledge, doesn’t have a task killer as aggressive as some other vendors have. The closer you come to Google/AOSP Android, the lower the probability that your tasks will get killed at random is my experience.
The fuss is that 3rd party apps need a persistent notification to stay alive. But, because Google owns pixels, it can skip that step and be less intrusive/visible, which others can not.
The WireGuard and tailscale apps work great for me without a persistent notification.
WireGuard doesn’t support notifications at all. Tailscale does and by default it shows a persistent notification but you can just silence it or turn it off in the apps notification settings.
Persistent notification thus seems to be unnecessary for VPNs to function, Google/Android dev documentation recommends a persistent notification for the UX but it’s not needed. https://developer.android.com/guide/topics/connectivity/vpn
In conclusion it appears that third party apps can indeed provide a VPN service without a notification.
Unfortunately, that will mean your app can be killed on many smartphones from device makers like xiaomi, Oppo, and huawei, which have aggressive battery optimization. I had this issue on a redmi device where background apps would be killed unless a permanent notification was present.
I haven’t tried wireguard. But, I should give them a try and see how it goes in samsung.
Ah, I have a pixel which apparently is pretty nice on the not killing your app side
https://dontkillmyapp.com/google
The ranking may make it sound like samsung is the worst. But that’s not been the case since android 12. I do not have app reload or app killing issues on this one and find it much better than what I used to experience on miui.
I published an app on the play store that purely relies on a persistent notification + wakelocks to keep the screen active (since the whole point of the app is to keep the screen awake) - Samsung was definitely the worst when it comes to this for my app, as I would receive endless support emails about people with Samsung devices where it would get killed, even when disabling battery optimization for my app. The other manufacturers listed there came up every now and then, but disabling battery optimization generally did the trick for them.
With there being nothing that I could do for my app, I tried disabling compatibility in the play store for a ton of Samsung models, but then I got even more emails about people wondering why it wasn’t available anymore so I re-enabled it, but to this day there’s still (AFAIK) zero things I can do to prevent the app from getting killed on those devices.
What app is that? I only notice app reload issues when I max my ram usage playing heavy games or running apps which maximum ram.
It’s called “Caffeinate” (I’m avoiding posting the direct link just so I don’t break any self promotion rules), I made it in the Android 7 days when the quick settings Tile API came out to replicate the similar tile that was available in CyanogenMod. It ended up getting way more downloads than I ever expected honestly - I just wanted to try the new API haha.
I know that Caffeinate itself doesn’t use up a lot of RAM (the only thing it does when its active is create a persistent notification and creates a wakelock in order to keep the screen active), but perhaps the lower end Samsung device models just have less RAM available, so opening a browser or such kills it.
I tried your caffeinate app. The last time I checked, it was using 32mb while running. Currently, using 11mb. Android says it uses an average of 143kb with a maximum of 7.8mb for the whole day.
It has been installed for the past 3 days, and I try it once a day from the drop-down tile. It hasn’t been killed or reloaded yet.
I have 6GB of ram with 6GB of ram plus enabled. I guess its low ram and cpu usage make it never likely to be booted off ram. Those users who complain must be using Samsung devices on older oneui and / or low ram like 3GB or 4GB.
Clicking on Samsung makes it sound like it’s still a problem on Android 13 at least.
I’m glad it works for you at least, I have never used a Samsung phone so I might be fixed altogether but idk.
You could if you want, add an issue or something on their GitHub
I do not feel too strongly about it, so I will refrain. But, if I find the time and energy to spend, I may open an issue later.
Depends on how much RAM your device has. My tablet definitely kills background tasks for no good reason, but it’s a mid tier one so I half expected it.
I was under the impression that the “Disable battery optimisations” feature was to prevent exactly this. Maybe I misunderstood what it does, but a bunch of apps designed to run in the background tell you to disable this functionality for their app for this very reason.
Some phone’s battery optimization goes beyond the native Android stuff, so even with that step, apps without a notification may get killed.
I see! Fun…
WireGuard works fine on my samsung
That is for applications that need access to a LOCAL_SERVICE while not in foreground. That’s like Geolocation or screen orientation. VPN is not one of those. You can kill the foreground application from the recent apps by sliding up.
No real VPN app needs to have an application window and a background service (same thread) running to provide a VPN. If it does, it is doing something else not related to VPN.
If you want to add a pause button, applications can add custom tiles.
Apps that target modern Android APIs do not need a persistent notification.
Apps that insist on building against Android 5 targets in 2023 do, yes.
Persistent notification was added in response to android 8+ background restrictions. You didn’t need it before.
Apps that need to be constantly alive do that to avoid being killed by the system on android devices that are not stock or pixel. Apps like tasker, accubattery, Internet speed meter, adguard all target the latest android version 12 or higher.
We are on android 14. You can not install apps targeting android 5 from the playstore today.
If they’re targeting modern Android, they can simply direct the user to the Battery settings panel where one can set the app to run arbitrarily in the background. No notifications are needed.
Cite your sources because that’s not how persistent notification works. PIA doesn’t need it. It sounds like a poorly written app.
Edit: DNS66 as well.
[This comment has been deleted by an automated system]
I checked playstore reviews of wireguard, and people are complaining that wireguard stops working after a while. Which makes me think. For wider compatibility and persistent background tasks, you do need one to stay alive.
Because (from what I’ve read) battery optimization may still kill them, depending on the phone.
Perhaps, but this article is specifically about the Pixel which, to my knowledge, doesn’t have a task killer as aggressive as some other vendors have. The closer you come to Google/AOSP Android, the lower the probability that your tasks will get killed at random is my experience.