Język

CardEmulation.SetRequireDeviceUnlockForService(ComponentName, Boolean) Method

Definition

Sets whether the device must be unlocked for the service to be activated.

[Android.Runtime.Register("setRequireDeviceUnlockForService", "(Landroid/content/ComponentName;Z)V", "", ApiSince=36)]
public void SetRequireDeviceUnlockForService(Android.Content.ComponentName service, bool enable);
[<Android.Runtime.Register("setRequireDeviceUnlockForService", "(Landroid/content/ComponentName;Z)V", "", ApiSince=36)>]
member this.SetRequireDeviceUnlockForService : Android.Content.ComponentName * bool -> unit

Parameters

service
ComponentName

The component name of the service. This value cannot be null.

enable
Boolean

Whether the service should only be activated when the device is unlocked

Attributes

Remarks

Sets whether the device must be unlocked for the service to be activated. This API overrides the android:requireDeviceUnlock attribute declared in the service's manifest.

Android reference for android.nfc.cardemulation.CardEmulation.setRequireDeviceUnlockForService.

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