Question

i want to implement in my app (ANDROID) this function: when a process or app runs or start, all the connection disabled, for example: when i open facebook i want to disable wi-fi or 3g. I searched on google, but i didn't found anything, if you don't undersant, you can ask me for explain. I wish the wifi when I open an app is turned off, or when I open an app to deactivate 3g, and when I close it or leave it in the background are reactivated both the 3g if wi-fi is active if it is active. I did not understand how to do, I have half a mind to see which of the two types of connectivity are using the user at the moment, but for the restto nothing.

Sorry for my English but i'm not English :) Thanks

Était-ce utile?

La solution

This post shows you how to disable wifi

Perhaps you can check what processes are currently running. Once you see Facebook you can disable what you want.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top