NetworkStatus Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Identifies the result of adding or removing Wi-Fi network suggestions.
public enum NetworkStatus
type NetworkStatus =
- Inheritance
-
NetworkStatus
Fields
| Name | Value | Description |
|---|---|---|
| SuggestionsSuccess | 0 | Reason code if all of the network suggestions were successfully added or removed. Android reference for 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. |
| SuggestionsErrorInternal | 1 | Reason code if there was an internal error in the platform while processing the addition or removal of suggestions. Android reference for 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. |
| SuggestionsErrorAppDisallowed | 2 | Reason code if the user has disallowed "android:change_wifi_state" app-ops from the app. Android reference for 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. |
| SuggestionsErrorAddDuplicate | 3 | Reason code if one or more of the network suggestions added already exists in platform's database. Note: this code will not be returned with Android 11 as in-place modification is allowed, please check addNetworkSuggestions(List). Android reference for 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. |
| SuggestionsErrorAddExceedsMaxPerApp | 4 | Reason code if the number of network suggestions provided by the app crosses the max threshold set per app. The framework will reject all suggestions provided by addNetworkSuggestions(List) if the total size exceeds the limit. 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. |
| SuggestionsErrorRemoveInvalid | 5 | Reason code if one or more of the network suggestions removed does not exist in platform's database. The framework won't remove any suggestions if one or more of suggestions provided by removeNetworkSuggestions(List) does not exist in database. Android reference for 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. |
| SuggestionsErrorAddNotAllowed | 6 | Reason code if one or more of the network suggestions added is not allowed. The framework will reject all suggestions provided by addNetworkSuggestions(List) if one or more of them is not allowed. This error may be caused by suggestion is using SIM-based encryption method, but calling app is not carrier privileged. Android reference for 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. |
| SuggestionsErrorAddInvalid | 7 | Reason code if one or more of the network suggestions added is invalid. Framework will reject all the suggestions in the list. The framework will reject all suggestions provided by addNetworkSuggestions(List) if one or more of them is invalid. Please use WifiNetworkSuggestion.Builder to create network suggestions. Android reference for 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. |
| SuggestionsErrorRestrictedByAdmin | 8 | Reason code if UserManager.DISALLOW_ADD_WIFI_CONFIG user restriction is set and calling app is restricted by device admin. 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. |
Remarks
AddNetworkSuggestions(IList<WifiNetworkSuggestion>) and RemoveNetworkSuggestions(IList<WifiNetworkSuggestion>) return these status codes. Zero indicates success; other values identify a rejected or failed operation.