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);
}
我希望移动数据和wifi网络禁用,并从程序启用。有可能吗?