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
  • 32,421
  • 21
  • 173
  • 232
Darpan
  • 5,193
  • 3
  • 45
  • 74

3 Answers3

2

Here is a good thread, maybe it help you

Community
  • 1
  • 1
Muhammad Nabeel Arif
  • 18,528
  • 8
  • 48
  • 70
1

How about this?

context.startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS)); 
Antrromet
  • 14,318
  • 9
  • 56
  • 73
1

try this

startActivity(new Intent(Settings.ACTION_WIRELESS_SETTINGS));
NagarjunaReddy
  • 8,500
  • 10
  • 60
  • 94