NfcFCardEmulation.RegisterSystemCodeForService(ComponentName, String) Method

Definition

Registers a System Code for the specified service.

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

Parameters

service
ComponentName

The component name of the service

systemCode
String

The System Code to be registered

Returns

whether the registration was successful.

Attributes

Remarks

Registers a System Code for the specified service.

The System Code must be in range from "4000" to "4FFF" (excluding "4*FF").

If a System Code was previously registered for this service (either statically through the manifest, or dynamically by using this API), it will be replaced with this one.

Even if the same System Code is already registered for another service, this method succeeds in registering the System Code.

Note that you can only register a System Code 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.NfcFCardEmulation.registerSystemCodeForService(android.content.ComponentName, java.lang.String).

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