About a decade ago, I used to daily drive a custom Android ROM called CynanogenMod. In its settings app, there were in-built switches for cutting off any app’s internet access. Sadly, native Android still doesn’t have this feature, even in the latest version 16 update. Let me show you a workaround and why you might want to use it.
Why You Should Block Internet Access for Apps Separately
First, not every app needs internet access in the first place. Others don’t need background access because they’re mostly using it to phone home with your personal data. Blocking internet access for these apps makes them more privacy-friendly.
A lot of Android apps tend to rely on ads for revenue. Some display tiny banners (which I don’t mind) but others display full-screen ad walls every few minutes, which gets annoying really fast. Often these apps don’t even need an internet connection and only gain internet access just to show ads. If an app or game can work offline for you, cutting off the internet gets rid of the ads too.
Like I said, Android apps tend to run in the background to show notifications or send user data back, which does two things: it sucks up battery life, and it burns data, depending on the background activity levels. Taking these apps offline will also save you some battery and data (useful if you’re on a limited plan).
Android Still Doesn’t Support This Natively, So We Need an App
Stock Android doesn’t offer a native feature to block internet access for specific apps, and neither do OEM skins of Android (as far as I know). So we’ll need a third-party app to make this work. NetGuard is a free, open-source app from the developer of FairMail. It doesn’t require root access, so it works on any Android device. It lets you disable Wi-Fi and data separately for apps, so if you want to save data, you can enable cellular for critical apps only and switch the rest to only use Wi-Fi. You can create a lock-down mode with exceptions, and even log an app’s attempts to connect to the internet.
NetGuard uses a local VPN setup to filter traffic, so it doesn’t need the system-level access that requires root. So, if you want to use another VPN service at the same time, it won’t work alongside NetGuard because you can only tunnel traffic through one VPN at a time.
How to Set Up NetGuard and Block Internet Access
The NetGuard setup is straightforward enough. Start by installing the app from the Google Play Store or F-Droid. Tap the big switch on top of the app. On the first launch, the app will ask permission to use the local VPN service. Grant that.
By default, Android manages how an app runs in the background to conserve battery life, which means the system can randomly kill an installed app. To keep the NetGuard app working in the background, we will exclude NetGuard from Android’s battery optimization measures. The app will prompt you to do that, but if you missed that, just go to the app’s settings and tap “Don’t Allow” on the background battery optimization feature.
Once you’re on the dashboard, you’ll see a list of all installed apps with Wi-Fi and cellular icons next to each. NetGuard works on a simple color-coded system: a green Wi-Fi or cellular icon means that the app can access Wi-Fi or data, and a red Wi-Fi or cellular icon blocks that app’s access to that connection.
All you have to do is tap the relevant icon next to the app in the list to trigger the filter. The setup is modular, so you can either switch off the Wi-Fi, data, or both for any given app.
If you have a long list of apps, and you want to block all apps at once, you don’t have to scroll through the entire list and press toggles for each app to manage internet access. That’s what the Lockdown Traffic mode is for. In Lockdown Traffic mode, NetGuard blocks internet traffic from all installed apps on the phone. Press the three dots in the corner and then check “Lockdown Traffic” to enable this mode.
For most use cases, you don’t want to disable internet access for all apps wholesale. NetGuard also lets you allow selected apps to bypass the Lockdown Traffic restrictions. Tap an app’s name to display an extra set of filters for that app. Here you can tap “Allow in lockdown mode” to add it to the allow list. You can add multiple apps to the allow list and persistently keep lockdown mode on.
NetGuard also lets you create granular filters like that to target an app’s background activity. Once you have switched off an app’s data or Wi-Fi with the quick toggles, tap its name to reveal the extra filters. Here you can choose how the app’s access is restricted when the screen is on. You can allow Wi-Fi, data, or both when the screen is off, and NetGuard will automatically block it down when you’re not actively using your phone.
Some Bonus Tips
I mentioned earlier that you can cut off an app’s internet access to get rid of ads or spam notifications, and while that works for most apps, it’s not a surefire solution. It might not work for every app because Google has designed Google Play Services to display those ads on top of the app, so even if you block that app’s internet access, you might still see the ads that Google Play Services serves.
The same goes for incoming notifications and messages that Google Play Services receives. Android’s in-built download manager app gets internet access by default, and since NetGuard can’t filter system apps, downloads will also go through, even in NetGuard’s Lockdown Traffic mode.
Instead of opening and closing the NetGuard app every time you need to enable or revoke internet access, you can add it to the quick settings panel in the notification shade. Just pull down the quick settings shade, tap the edit icon, and add the Netguard toggle to the list of toggles.