Partager via


Settings.ActionWifiAddNetworks Field

Definition

Activity Action: Show setting page to process the addition of Wi-Fi networks to the user's saved network list.

[Android.Runtime.Register("ACTION_WIFI_ADD_NETWORKS", ApiSince=30)]
public const string ActionWifiAddNetworks;
[<Android.Runtime.Register("ACTION_WIFI_ADD_NETWORKS", ApiSince=30)>]
val mutable ActionWifiAddNetworks : string

Field Value

Attributes

Remarks

Activity Action: Show setting page to process the addition of Wi-Fi networks to the user's saved network list. The app should send a new intent with an extra that holds a maximum of five android.net.wifi.WifiNetworkSuggestion that specify credentials for the networks to be added to the user's database. The Intent should be sent via the android.app.Activity#startActivityForResult(Intent, int) API.

Note: The app sending the Intent to add the credentials doesn't get any ownership over the newly added network(s). For the Wi-Fi stack, these networks will look like the user manually added them from the Settings UI.

Input: The app should put parcelable array list of android.net.wifi.WifiNetworkSuggestion into the #EXTRA_WIFI_NETWORK_LIST extra.

Output: After android.app.Activity#startActivityForResult(Intent, int), the callback android.app.Activity#onActivityResult(int, int, Intent) will have a result code android.app.Activity#RESULT_OK to indicate user pressed the save button to save the networks or android.app.Activity#RESULT_CANCELED to indicate that the user rejected the request. Additionally, an integer array list, stored in #EXTRA_WIFI_NETWORK_RESULT_LIST, will indicate the process result of each network.

Java documentation for android.provider.Settings.ACTION_WIFI_ADD_NETWORKS.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to