Sdílet prostřednictvím


CardEmulation.UnsetOffHostForService(ComponentName) Method

Definition

Unsets the off-host Secure Element for the given service.

[Android.Runtime.Register("unsetOffHostForService", "(Landroid/content/ComponentName;)Z", "", ApiSince=29)]
[Android.Runtime.RequiresPermission("android.permission.NFC")]
public bool UnsetOffHostForService (Android.Content.ComponentName service);
[<Android.Runtime.Register("unsetOffHostForService", "(Landroid/content/ComponentName;)Z", "", ApiSince=29)>]
[<Android.Runtime.RequiresPermission("android.permission.NFC")>]
member this.UnsetOffHostForService : Android.Content.ComponentName -> bool

Parameters

service
ComponentName

The component name of the service

Returns

whether the registration was successful.

Attributes

Remarks

Unsets the off-host Secure Element for the given service.

Note that this will only remove Secure Element that was dynamically set using the #setOffHostForService(ComponentName, String) and resets it to a value that was statically assigned using manifest.

Note that you can only unset off-host SE for a service that is running under the same UID as the caller of this API. Typically this means you need to call this from the same package as the service itself, though UIDs can also be shared between packages using shared UIDs.

Java documentation for android.nfc.cardemulation.CardEmulation.unsetOffHostForService(android.content.ComponentName).

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