How to invoke system dialog for “Connect to” secur

2019-06-04 07:36发布

问题:

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:

you can just try launching the connection settings preferences activity

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



标签: android wifi