How to invoke system dialog for “Connect to” secured network?

泄露秘密 提交于 2019-12-23 03:07:30

问题


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}



来源:https://stackoverflow.com/questions/2316952/how-to-invoke-system-dialog-for-connect-to-secured-network

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!