tags:

views:

225

answers:

1

My application needs to establish a new Wi-Fi connection to a secured network. The catch is that the application does not know the password/key/passphrase or whatever it is called for WEP/WPA. And it should not know!

In such case, I would like my application to invoke the system "Connect to" dialog. Only the system WifiManager should remember this password, and the fact that my application is not involved should be obvious to the end user.

Is this possible? I thought that it should be similar to using Intent() for android.content.Intent.ACTION_SEND to send a picture with another applications.

+1  A: 

you can just try launching the connection settings preferences activity

action=android.intent.action.MAIN comp={com.android.settings/com.android.settings.wifi.WifiSettings}

Reflog
thanks, this I attain by two different ways: **startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS))** or **startActivity(new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK))**
Alex Cohn
But then the user must choose the network manually. Worse, she must understand that she must choose the network, and I cannot even show her a hint about that, since the screen is managed by com.android.settings application.
Alex Cohn
you could always display a confirmation dialog like:"Network connection cannot be established. Would you like to open phone wifi preferences to configure the access?"and then launch the intent...
Reflog
I decided to open a feature request for this action, see http://code.google.com/p/android/issues/detail?id=6856
Alex Cohn