When the user running my application, I want my application forward the user to the settings -> location & security -> Use wireless networks. How am I going to achieve that?
Asked
Active
Viewed 454 times
1
-
What research have you done? What have you found on google? – Jon Taylor Jul 06 '12 at 09:59
-
2Look at the top answer here: [http://stackoverflow.com/questions/2318310/how-can-i-call-wi-fi-settings-screen-from-my-application-using-android][1] [1]: http://stackoverflow.com/questions/2318310/how-can-i-call-wi-fi-settings-screen-from-my-application-using-android – hardillb Jul 06 '12 at 10:02
-
ok, thank, cant imagine that just one line will do: startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS)); – fire-fly3 Jul 06 '12 at 10:12
2 Answers
2
Start Wireless Settings as:
Intent intent=new Intent(Settings.ACTION_WIRELESS_SETTINGS);
ComponentName cName = new ComponentName("com.android.settings","com.android.settings.WirelessSettings");
intent.setComponent(cName);
startActivity(intent);

ρяσѕρєя K
- 132,198
- 53
- 198
- 213
-
1If you want to launch only Wifi Settings then use `startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));` – ρяσѕρєя K Jul 06 '12 at 10:11
-
what's the difference with your answer (which might be non portable : http://stackoverflow.com/a/7024631/281545) ? – Mr_and_Mrs_D Jul 16 '13 at 22:36