Magnetic Stripe Readers
Because a magnetic stripe reader is another point of service device, its APIs follow the same pattern as the barcode scanner APIs:
→ You must declare a pointOfService
device capability.
→ You get an instance of MagneticStripeReader
using one of the same approaches: calling its GetDefaultAsync
method or FromIdAsync
in conjunction with an API from the Windows.Devices.Enumeration
namespace to get the device ID.
→ It has the same claiming model, so you must call ClaimReaderAsync
to get an instance of ClaimedMagneticStripeReader
then potentially handle its ReleaseDeviceRequested
event to call RetainDevice
.
→ You must handle events to retrieve data, and then enable the ClaimedMagneticStripeReader
by setting IsEnabled
to true ...
Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.