Open Wifi Settings

3 votes · 1 comment

Open wifi settings :)

raw ·
copy
· download
final Intent intent = new Intent(Intent.ACTION_MAIN, null); intent.addCategory(Intent.CATEGORY_LAUNCHER); final ComponentName cn = new ComponentName("com.android.settings", "com.android.settings.wifi.WifiSettings"); intent.setComponent(cn); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity( intent);
Add a comment

1 Comment

Isn't it easier to just use: Intent openWirelessSettings = new Intent("android.settings.WIRELESS_SETTINGS"); startActivity(openWirelessSettings);

Reply · May 31, 2012, 4:10 p.m.