Partager via


NfcFCardEmulation.GetNfcid2ForService(ComponentName) Method

Definition

Retrieves the current NFCID2 for the specified service.

[Android.Runtime.Register("getNfcid2ForService", "(Landroid/content/ComponentName;)Ljava/lang/String;", "", ApiSince=24)]
public string? GetNfcid2ForService (Android.Content.ComponentName? service);
[<Android.Runtime.Register("getNfcid2ForService", "(Landroid/content/ComponentName;)Ljava/lang/String;", "", ApiSince=24)>]
member this.GetNfcid2ForService : Android.Content.ComponentName -> string

Parameters

service
ComponentName

The component name of the service

Returns

the current NFCID2

Attributes

Remarks

Retrieves the current NFCID2 for the specified service.

Before calling #setNfcid2ForService(ComponentName, String), the NFCID2 contained in the Manifest file is returned. If "random" is specified in the Manifest file, a random number assigned by the system at installation time is returned. After setting an NFCID2 with #setNfcid2ForService(ComponentName, String), this NFCID2 is returned.

Java documentation for android.nfc.cardemulation.NfcFCardEmulation.getNfcid2ForService(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