DevicePolicyManager.SetLocationEnabled(ComponentName, Boolean) Method
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.
Called by device owners to set the user's global location setting.
[Android.Runtime.Register("setLocationEnabled", "(Landroid/content/ComponentName;Z)V", "GetSetLocationEnabled_Landroid_content_ComponentName_ZHandler", ApiSince=30)]
public virtual void SetLocationEnabled (Android.Content.ComponentName admin, bool locationEnabled);
[<Android.Runtime.Register("setLocationEnabled", "(Landroid/content/ComponentName;Z)V", "GetSetLocationEnabled_Landroid_content_ComponentName_ZHandler", ApiSince=30)>]
abstract member SetLocationEnabled : Android.Content.ComponentName * bool -> unit
override this.SetLocationEnabled : Android.Content.ComponentName * bool -> unit
Parameters
- admin
- ComponentName
Which DeviceAdminReceiver
this request is associated with
- locationEnabled
- Boolean
whether location should be enabled or disabled. <b>Note: </b> on
android.content.pm.PackageManager#FEATURE_AUTOMOTIVE automotive builds
, calls to
disable will be ignored.
- Attributes
Remarks
Called by device owners to set the user's global location setting.
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.