问题
I´m developing an application, where I´d like to have a button, which opens Androids built-in WiFi menu... (I don´t really want to implement scanning and connecting code by myself).
Is there any Intent I can send which opens this menu?
回答1:
You should use ACTION_PICK_WIFI_NETWORK action:
startActivity(new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK));
回答2:
Also, if you want to implement it yourself (so it looks like your app), the Android SDK offers the WifiManager-class, which should do most of the work for you.
回答3:
If you want to open the default Wifi settings dialog, you can use an intent with an ACTION_WIFI_SETTINGS action
来源:https://stackoverflow.com/questions/6103122/start-androids-wifi-manager-by-sending-an-intent