全部网络设置(ACTION_WIRELESS_SETTINGS); WIFI设置(ACTION_WIFI_SETTINGS); 3G流量设置: (ACTION_DATA_ROAMING_SETTINGS). 发送Intent, 系统接收并跳转.
整体: startActivity(new Intent(Settings.ACTION_WIRELESS_SETTINGS)); WIFI: startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS)); 流量: startActivity(new Intent(android.provider.Settings.ACTION_DATA_ROAMING_SETTINGS));
注意: 不同的手机有不同的设置页面, 并不会完全正确, 再不详细区分时, 全部网络设置即可. |