1

I know the method how we access WiFi settings, it is achieved through code below -

context.startActivity(new Intent(Settings.ACTION_WIRELESS_SETTINGS));

However, when I used it in android 4.0.3, it lead me to 'wireless configuration settings' page where I couldn't find 'turn on/off Wifi button'. As it is outside that wireless configuration page.

How I could achieve it? I am testing on Samsung Galaxy S2.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Darpan
  • 5,623
  • 3
  • 48
  • 80

3 Answers3

2

Here is a good thread, maybe it help you

Community
  • 1
  • 1
Muhammad Nabeel Arif
  • 19,140
  • 8
  • 51
  • 70
1

How about this?

context.startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS)); 
Antrromet
  • 15,294
  • 10
  • 60
  • 75
1

try this

startActivity(new Intent(Settings.ACTION_WIRELESS_SETTINGS));
NagarjunaReddy
  • 8,621
  • 10
  • 63
  • 98