1

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?

fire-fly3
  • 127
  • 3
  • 12
  • What research have you done? What have you found on google? – Jon Taylor Jul 06 '12 at 09:59
  • 2
    Look 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 Answers2

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
2

Try this,

startActivity(new Intent(Settings.ACTION_WIRELESS_SETTINGS));
sathish
  • 21
  • 3