NfcFCardEmulation.EnableService(Activity, ComponentName) Method

Definition

Allows a foreground application to specify which card emulation service should be enabled while a specific Activity is in the foreground.

[Android.Runtime.Register("enableService", "(Landroid/app/Activity;Landroid/content/ComponentName;)Z", "", ApiSince=24)]
public bool EnableService (Android.App.Activity? activity, Android.Content.ComponentName? service);
[<Android.Runtime.Register("enableService", "(Landroid/app/Activity;Landroid/content/ComponentName;)Z", "", ApiSince=24)>]
member this.EnableService : Android.App.Activity * Android.Content.ComponentName -> bool

Parameters

activity
Activity

The activity which prefers this service to be invoked

service
ComponentName

The service to be preferred while this activity is in the foreground

Returns

Boolean

whether the registration was successful

Attributes

Remarks

Java documentation for android.nfc.cardemulation.NfcFCardEmulation.enableService(android.app.Activity, 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