NetworkCallbackFlags 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.
Defines values that correspond to the Android ConnectivityManager.NetworkCallback.FLAG_* constants.
This enumeration supports a bitwise combination of its member values.
[System.Flags]
public enum NetworkCallbackFlags
[<System.Flags>]
type NetworkCallbackFlags =
- Inheritance
-
NetworkCallbackFlags
- Attributes
Fields
| Name | Value | Description |
|---|---|---|
| None | 0 | Specifies no optional network-callback flags. |
| IncludeLocationInfo | 1 | Requests that location-sensitive information be included in network capabilities. Prior to Android 12, this information is always returned to apps holding the appropriate permission, possibly noting that the app has used location. On Android 12 and later, location-sensitive information is normally removed from callback objects unless this flag is set. For compatibility, the system may still include the owner UID of a Wi-Fi suggestion for an app targeting Android 11 or lower if it has location permission. When this flag is set, the system checks location permission and the location toggle state, and notes location usage if location information is returned. Use this flag to request location-sensitive data in network capabilities sent via OnCapabilitiesChanged(Network, NetworkCapabilities). Location-sensitive data includes some TransportInfo values, such as WifiInfo, and OwnerUid for apps using WifiNetworkSuggestion. 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. |