SmartCardEmulator SmartCardEmulator SmartCardEmulator SmartCardEmulator Class

Definition

Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Prerelease APIs are identified by a Prerelease label.

[Contains prerelease APIs.]
Represents a smart card emulator device.

public : sealed class SmartCardEmulator : ISmartCardEmulator, ISmartCardEmulator2public sealed class SmartCardEmulator : ISmartCardEmulator, ISmartCardEmulator2Public NotInheritable Class SmartCardEmulator Implements ISmartCardEmulator, ISmartCardEmulator2// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.SmartCards.SmartCardEmulatorContract (introduced v1)

Properties

EnablementPolicy EnablementPolicy EnablementPolicy EnablementPolicy

Gets the current card emulation policy set by the user.

public : SmartCardEmulatorEnablementPolicy EnablementPolicy { get; }public SmartCardEmulatorEnablementPolicy EnablementPolicy { get; }Public ReadOnly Property EnablementPolicy As SmartCardEmulatorEnablementPolicy// You can use this property in JavaScript.
Value
SmartCardEmulatorEnablementPolicy SmartCardEmulatorEnablementPolicy SmartCardEmulatorEnablementPolicy SmartCardEmulatorEnablementPolicy

The current card emulation policy set by the user through the phone settings. This property is read-only to the app; you should tell the user to change the card emulation policy in the settings on his or her phone, if their mobile operator allows it.

Remarks

You can launch the URI ms-settings-nfctransactions: from within your app to take the user to the NFC control panel for transactions so they can change the enablement policy.

See Also

MaxAppletIdGroupRegistrations MaxAppletIdGroupRegistrations MaxAppletIdGroupRegistrations MaxAppletIdGroupRegistrations

Gets the maximum number of permitted applet ID group registrations.

public : static ushort MaxAppletIdGroupRegistrations { get; }public static ushort MaxAppletIdGroupRegistrations { get; }Public Static ReadOnly Property MaxAppletIdGroupRegistrations As ushort// You can use this property in JavaScript.
Value
ushort ushort ushort ushort

The maximum number of permitted applet ID group registrations.

See Also

Methods

GetAppletIdGroupRegistrationsAsync() GetAppletIdGroupRegistrationsAsync() GetAppletIdGroupRegistrationsAsync() GetAppletIdGroupRegistrationsAsync()

Gets the registered applet identifier groups for this smart card, asynchronously.

public : static IAsyncOperation<IVectorView<SmartCardAppletIdGroupRegistration>> GetAppletIdGroupRegistrationsAsync()public static IAsyncOperation<IReadOnlyList<SmartCardAppletIdGroupRegistration>> GetAppletIdGroupRegistrationsAsync()Public Static Function GetAppletIdGroupRegistrationsAsync() As IAsyncOperation( Of IReadOnlyListSmartCardAppletIdGroupRegistration )// You can use this method in JavaScript.
Returns
IAsyncOperation<IVectorView<SmartCardAppletIdGroupRegistration>> IAsyncOperation<IReadOnlyList<SmartCardAppletIdGroupRegistration>> IAsyncOperation<IReadOnlyList<SmartCardAppletIdGroupRegistration>> IAsyncOperation<IReadOnlyList<SmartCardAppletIdGroupRegistration>>

The registered applet identifier groups for this smart card.

See Also

GetDefaultAsync() GetDefaultAsync() GetDefaultAsync() GetDefaultAsync()

Returns the SmartCardEmulator object representing the default smart card emulator device.

public : static IAsyncOperation<SmartCardEmulator> GetDefaultAsync()public static IAsyncOperation<SmartCardEmulator> GetDefaultAsync()Public Static Function GetDefaultAsync() As IAsyncOperation( Of SmartCardEmulator )// You can use this method in JavaScript.
Returns

After the asynchronous operation completes, returns the default smart card emulator or null if there is no smart card emulator present.

See Also

IsHostCardEmulationSupported() IsHostCardEmulationSupported() IsHostCardEmulationSupported() IsHostCardEmulationSupported()

Gets a Boolean value indicating if host card emulation is supported by this device.

public : PlatForm::Boolean IsHostCardEmulationSupported()public bool IsHostCardEmulationSupported()Public Function IsHostCardEmulationSupported() As bool// You can use this method in JavaScript.
Returns
PlatForm::Boolean bool bool bool

True if host card emulation is supported by this device.

See Also

IsSupported() IsSupported() IsSupported() IsSupported()

Prerelease. Returns whether the SmartCardEmulator is supported.

public : static PlatForm::Boolean IsSupported()public static bool IsSupported()Public Static Function IsSupported() As bool// You can use this method in JavaScript.
Returns
PlatForm::Boolean bool bool bool

True if SmartCardEmulator is supported.

Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16257.0)
API contract
Windows.Devices.SmartCards.SmartCardEmulatorContract (introduced v5)

RegisterAppletIdGroupAsync(SmartCardAppletIdGroup) RegisterAppletIdGroupAsync(SmartCardAppletIdGroup) RegisterAppletIdGroupAsync(SmartCardAppletIdGroup) RegisterAppletIdGroupAsync(SmartCardAppletIdGroup)

Asynchronously registers a group of applet IDs.

public : static IAsyncOperation<SmartCardAppletIdGroupRegistration> RegisterAppletIdGroupAsync(SmartCardAppletIdGroup appletIdGroup)public static IAsyncOperation<SmartCardAppletIdGroupRegistration> RegisterAppletIdGroupAsync(SmartCardAppletIdGroup appletIdGroup)Public Static Function RegisterAppletIdGroupAsync(appletIdGroup As SmartCardAppletIdGroup) As IAsyncOperation( Of SmartCardAppletIdGroupRegistration )// You can use this method in JavaScript.
Parameters
Returns
See Also

Start() Start() Start() Start()

Starts the smart card emulator. This method must be called from a background task.

public : void Start()public void Start()Public Function Start() As void// You can use this method in JavaScript.
See Also

UnregisterAppletIdGroupAsync(SmartCardAppletIdGroupRegistration) UnregisterAppletIdGroupAsync(SmartCardAppletIdGroupRegistration) UnregisterAppletIdGroupAsync(SmartCardAppletIdGroupRegistration) UnregisterAppletIdGroupAsync(SmartCardAppletIdGroupRegistration)

Asynchronously unregisters a previously registered group of applet IDs.

public : static IAsyncAction UnregisterAppletIdGroupAsync(SmartCardAppletIdGroupRegistration registration)public static IAsyncAction UnregisterAppletIdGroupAsync(SmartCardAppletIdGroupRegistration registration)Public Static Function UnregisterAppletIdGroupAsync(registration As SmartCardAppletIdGroupRegistration) As IAsyncAction// You can use this method in JavaScript.
Parameters
Returns

An IAsyncAction object that is used to control the asynchronous operation.

See Also

Events

ApduReceived ApduReceived ApduReceived ApduReceived

Occurs when an application protocol data unit (APDU) is received by the NFC controller.

public : event TypedEventHandler ApduReceived<SmartCardEmulator,  SmartCardEmulatorApduReceivedEventArgs>public event TypedEventHandler ApduReceived<SmartCardEmulator,  SmartCardEmulatorApduReceivedEventArgs>Public Event ApduReceived<SmartCardEmulator,  SmartCardEmulatorApduReceivedEventArgs>// You can use this event in JavaScript.
See Also

ConnectionDeactivated ConnectionDeactivated ConnectionDeactivated ConnectionDeactivated

Occurs when the connection with the device is physically broken or when the NFC reader requests a connection to a different app.

public : event TypedEventHandler ConnectionDeactivated<SmartCardEmulator,  SmartCardEmulatorConnectionDeactivatedEventArgs>public event TypedEventHandler ConnectionDeactivated<SmartCardEmulator,  SmartCardEmulatorConnectionDeactivatedEventArgs>Public Event ConnectionDeactivated<SmartCardEmulator,  SmartCardEmulatorConnectionDeactivatedEventArgs>// You can use this event in JavaScript.
See Also

See Also