Share via


UserManager.DisallowShareLocation Field

Definition

Specifies if a user is disallowed from turning on location sharing.

[Android.Runtime.Register("DISALLOW_SHARE_LOCATION")]
public const string DisallowShareLocation;
[<Android.Runtime.Register("DISALLOW_SHARE_LOCATION")>]
val mutable DisallowShareLocation : string

Field Value

Attributes

Remarks

Specifies if a user is disallowed from turning on location sharing.

In a managed profile, location sharing by default reflects the primary user's setting, but can be overridden and forced off by setting this restriction to true in the managed profile.

A device owner and a profile owner can set this restriction. When it is set by a device owner, a profile owner on the primary user or by a profile owner of an organization-owned managed profile on the parent profile, it prevents the primary user from turning on location sharing.

Holders of the permission android.Manifest.permission#MANAGE_DEVICE_POLICY_LOCATION can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is false.

Key for user restrictions.

Type: Boolean

Java documentation for android.os.UserManager.DISALLOW_SHARE_LOCATION.

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

See also