/*Intent localIntent = new Intent("/");
localIntent.setComponent(new ComponentName(
"com.android.settings",
"com.android.settings.WirelessSettings"));
localIntent.setAction("android.intent.action.VIEW");
startActivity(localIntent);*/
//由于4.0以上把原来的设置方式舍弃了所以上面的代码舍去
if(android.os.Build.VERSION.SDK_INT > 13 ){
//3.2以上打开设置界面,也可以直接用ACTION_WIRELESS_SETTINGS打开到wifi界面
startActivity(new Intent(android.provider.Settings.ACTION_SETTINGS));}
else {
startActivity(new Intent(android.provider.Settings.ACTION_WIRELESS_SETTINGS));
}
localIntent.setComponent(new ComponentName(
"com.android.settings",
"com.android.settings.WirelessSettings"));
localIntent.setAction("android.intent.action.VIEW");
startActivity(localIntent);*/
//由于4.0以上把原来的设置方式舍弃了所以上面的代码舍去
if(android.os.Build.VERSION.SDK_INT > 13 ){
//3.2以上打开设置界面,也可以直接用ACTION_WIRELESS_SETTINGS打开到wifi界面
startActivity(new Intent(android.provider.Settings.ACTION_SETTINGS));}
else {
startActivity(new Intent(android.provider.Settings.ACTION_WIRELESS_SETTINGS));
}