wifiManager = (WifiManager) this.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
if (wifiManager.isWifiEnabled()) {
state = false;
tBMobileData.setImageResource(R.drawable.dataoff);
} else {
state = true;
tBMobileData.setImageResource(R.drawable.dataon);
}
I want mobile data and wifi network disabled, and enabled from program. Is it possible or not?