DevicePolicyManager.SetLocationEnabled(ComponentName, Boolean) 方法

定义

设备所有者调用以设置用户的全局位置设置。

[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

参数

admin
ComponentName

DeviceAdminReceiver此请求与

locationEnabled
Boolean

是否应启用或禁用位置。 <b>注意: </b> on android.content.pm.PackageManager#FEATURE_AUTOMOTIVE automotive builds,将忽略对禁用的调用。

属性

注解

设备所有者调用以设置用户的全局位置设置。

适用于 . 的 android.app.admin.DevicePolicyManager.setLocationEnabled(android.content.ComponentName, boolean)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于