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 used by the Android NetworkCallbackFlags API.
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 | |
| IncludeLocationInfo | 1 | Inclusion of this flag means location-sensitive redaction requests keeping location info. Some objects like NetworkCapabilities may contain location-sensitive information. Prior to Android 12, this information is always returned to apps holding the appropriate permission, possibly noting that the app has used location. In Android 12 and above, by default the sent objects do not contain any location information, even if the app holds the necessary permissions, and the system does not take note of location usage by the app. Apps can request that location information is included, in which case the system will check location permission and the location toggle state, and take note of location usage by the app if any such information is returned. Use this flag to include any location sensitive data in NetworkCapabilities sent via onCapabilitiesChanged(Network,NetworkCapabilities). These include: Some transport info instances (retrieved via NetworkCapabilities.getTransportInfo()) like WifiInfo contain location sensitive information; OwnerUid (retrieved via NetworkCapabilities.getOwnerUid() is location sensitive for wifi suggestor apps (i.e 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. |