ConnectivityManager.NetworkCallback.FlagIncludeLocationInfo Field
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.
Caution
This constant will be removed in the future version. Use Android.Net.NetworkCallbackFlags enum directly instead of this field.
Inclusion of this flag means location-sensitive redaction requests keeping location info.
[Android.Runtime.Register("FLAG_INCLUDE_LOCATION_INFO", ApiSince=31)]
[System.Obsolete("This constant will be removed in the future version. Use Android.Net.NetworkCallbackFlags enum directly instead of this field.", true)]
public const Android.Net.NetworkCallbackFlags FlagIncludeLocationInfo = 1;
[<Android.Runtime.Register("FLAG_INCLUDE_LOCATION_INFO", ApiSince=31)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Net.NetworkCallbackFlags enum directly instead of this field.", true)>]
val mutable FlagIncludeLocationInfo : Android.Net.NetworkCallbackFlags
Field Value
Value = 1- Attributes
Remarks
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: <li> Some transport info instances (retrieved via NetworkCapabilities#getTransportInfo()
) like android.net.wifi.WifiInfo
contain location sensitive information. <li> OwnerUid (retrieved via NetworkCapabilities#getOwnerUid()
is location sensitive for wifi suggestor apps (i.e using android.net.wifi.WifiNetworkSuggestion WifiNetworkSuggestion
).</li>
Note: <li> Retrieving this location sensitive information (subject to app's location permissions) will be noted by system. </li> <li> Without this flag any NetworkCapabilities
provided via the callback does not include location sensitive information.
Java documentation for android.net.ConnectivityManager.NetworkCallback.FLAG_INCLUDE_LOCATION_INFO
.
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.