• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Preventing apps from connecting to a specific network

  • Thread starter Thread starter Mayal0
  • Start date Start date
M

Mayal0

Guest
Hello, I am wondering if there is a way to tell certain apps to not use a specific wifi network when I am connected. At work, instead of blocking certain websites, they just block your device (MAC address blocking) when you access them. So if I were to accidentally open facebook while connected to the network, it would automatically block my phone from the wifi. I want to tell my phone to prevent specific apps like facebook and messenger from connecting to my work network and to use my data instead. But I don't want facebook to use data when I am at home. Is this possible?
 
I think that if your phone is connected to the WiFi network that will always be used rather than cellular data. If you are going to have these apps active during work hours it's probably safest not to connect to the WiFi, except then you are in the same position as if they block you!

I don't know how easy it is to tell Facebook to only sync manually because I don't have it installed. But I'm assuming that you do want Messenger to be live, in which case I can't see a workaround.
 
Does this do it?....
Settings>Data Usage>Menu>Network Restrictions and select the network you want to restrict access to? Looks like that is probably to restrict all background data on selected network though rather than certain apps accessing at all. Do apps like Greenify have something that would help? I don't use them so don't know, but maybe there are options to make phone sort of sleep on WiFi at certain times for certain apps maybe?
 
On mine that menu only seems to offer the option to restrict mobile data usage, whereas the OP wants to restrict one particular WiFi network instead.

I've never installed Greenify, so don't know what that can do. May be worth a look. I had a flick through Tasker before posting but couldn't see anything there that would obviously do what was wanted.
 
I'm assuming that you do want Messenger to be live, in which case I can't see a workaround.

Actually I don't care about messenger, so I went ahead and uninstalled that. I'm checking out Greenify now, that might be the best option I've got for now. There is a newer app called Trigger that looks like it might offer a creative solution possibly. We'll see.

FYI, I am Mayal0. I Just made an account.
 
Last edited:
On mine that menu only seems to offer the option to restrict mobile data usage, whereas the OP wants to restrict one particular WiFi network instead.

I've never installed Greenify, so don't know what that can do. May be worth a look. I had a flick through Tasker before posting but couldn't see anything there that would obviously do what was wanted.
That's strange, I thought it was weird that the WiFi spots were in the data usage not in the WiFi menu, but mines definitely that
 

Attachments

  • 1434640892266.jpg
    1434640892266.jpg
    40.4 KB · Views: 60
Ah, I managed to find that screen, but only because you told me it existed! I had to enable WiFi showing in the data usage menu then press the 3-dot button, and then select "Mobile hotspots" rather than "restrict background data" (a label whose purpose was far from obvious).

Well, I've learned something :)

But ok, from the description that looks like it might do the job, at least at the level letting you stop apps using the network in the background. Whether you can do this for just some apps, or whether it only works if you block mobile background data use generally, isn't so clear from the description. Nor whether you can do this without also forbidding mobile background use. Do you know?

Hi Alexander! :D
 
Baffles me, don't know why it's there or labelled as such.
Like I say, I don't really understand what it does either, never bothered using it (never knew it was there either until I found this thread and hunted around). I assume from the description it will just stop background data like Facebook, Whatsapp, Play Store etc doing things like updates, messages and annoying game requests and such over the WiFi unless the app is perhaps opened and the user does something like sends the message, posts something, downloads an app...but your guess would be as good as mine. No idea if it would block all internet access including data...
 
My best guess is that it will treat any you select the same as mobile data, so any restrictions you impose on background mobile data use will apply to these too. But that's just from reading what it says when I bring that menu up.

And of course it only shows anything there when you have WiFi on (just like the WiFi menu). I was using mobile data the last time I poked around there, so that would be another reason I didn't spot it! Why Android menus hide anything connected to WiFi networks when WiFi is off is something I have never understood...
 
It seems that greenify is doing the trick for now. Thank you guys for your help.

Since my device isn't rooted, I can't freeze apps or anything but it would be really cool if you could set up an app freeze schedule or something like Trigger which would automatically freeze an app when you connect to a certain network and then unfreeze it when you disconnect. I would have a hard time believing that I'm the only one with a block first ask questions later network admin. This would be useful at some schools or offices or even for parents wanting to make sure that their kids don't play games after bedtime.
 
I solved a similar problem recently using ProxyDroid, setting proxy only for the troublesome apps.


Oops, just noticed the 'not rooted' part! ProxyDroid requires root.
 
I solved a similar problem recently using ProxyDroid, setting proxy only for the troublesome apps.


Oops, just noticed the 'not rooted' part! ProxyDroid requires root.

Wouldn't this still send traffic from the app through the wifi network that I am connected to, just would be sending it through a proxy to mask it from our firewall? I'm not wanting to get around the firewall. They monitor use of those sites for a reason and it would be wrong of me to use a proxy to get away with doing what they don't want me to. I would rather just turn my wifi off every time I go to those sites. Thanks though.
 
Back
Top Bottom