private void swithToWifiSetting(){ AlertDialog.Builder ad=new AlertDialog.Builder(this); ad.setTitle("设置网络"); ad.setMessage("设置你的明旁数网络"); ad.setIcon(android.R.drawable.ic_dialog_alert); ad.setPositiveButton("Setting", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int i) { // TODO Auto-generated method stub //跳转到无限wifi网络设置界面启镇 startActivity(new Intent(android.provider.Settings.ACTION_WIFI_SETTINGS)); } }); ad.setNegativeButton("Cancel",new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int i) { dialog.dismiss(); } }); ad.create(); ad.show();//显示对话框 }这是点了一个按钮跳转到WIFI设置界面的代激首码,你看下.