ConnectivityManager.NetworkCallback.FlagIncludeLocationInfo Field

Definition

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.

Applies to