I\'m developing an app in which user can enable/disable mobile network on button click. I googled regarding this, but I get the solution of Airplane mode only. In airplane m
If you have root-permission you can use this method to disable mobile network:
try { Runtime.getRuntime().exec("su -c svc data disable"); } catch (IOException e) { Log.d("Error", e.getMessage()); }
If you want to enable mobile network, just replace disable with enable.