Open wireless settings from app
Try this:
startActivity(new Intent(android.provider.Settings.ACTION_WIRELESS_SETTINGS));
Or perhaps startActivityForResult. Your call. You can open different settings by checking the constants in Settings
You can access the WiFi settings directly using this:
Intent intent = new Intent(Intent.ACTION_MAIN);intent.setClassName("com.android.settings", "com.android.settings.wifi.WifiSettings");startActivity(intent);
The above did not work on Android 3.0, so I ended up using:
Intent intent = new Intent(Settings.ACTION_WIRELESS_SETTINGS);startActivity(intent);
That code works for me.
startActivity(new Intent(android.provider.Settings.ACTION_WIFI_SETTINGS));