DevicePolicyManager.SetLocationEnabled(ComponentName, Boolean) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
裝置擁有者呼叫來設定使用者的全域位置設定。
[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> 開啟 android.content.pm.PackageManager#FEATURE_AUTOMOTIVE automotive builds,停用呼叫將被忽略。
- 屬性
備註
裝置擁有者呼叫來設定使用者的全域位置設定。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。