I want to toggle the the mobile data button that can be seen when you pull down the menu strip. I have tried a couple of examples, but none seem to work. (How to disable Mobile Data on Android as an example). Is this simply not possible and if it is not possible, how would I go about disabling all connections?
Asked
Active
Viewed 796 times
0
-
Are you asking - How to add a toggle, when its in "On" state the internet is enabled, when its "OFF" state the internet should be disabled. – Psypher Jun 25 '15 at 16:40
-
I want to disable the 3g/4g connection. The purpose I had in mind was to disable all connections on the phone. – user2342875 Jul 04 '15 at 14:05
1 Answers
0
First of all you might check the status of mobile data and consequently enabling or disabling them.
To check the status see this answer and to toggle the data see this.
Remember to add to the manifest all permissions and keep in mind that this method is no longer available on android 5 (Lollipop).

Community
- 1
- 1

Matteo Basso
- 2,694
- 2
- 14
- 21
-
I take it that there is know way to toggle mobile data on and off on Lollipop? – user2342875 Jul 04 '15 at 14:01
-
You can toggle mobile data on Lollipop only if you have root permissions – Matteo Basso Jul 04 '15 at 14:07