For the complete documentation index, see llms.txt. This page is also available as Markdown.

Appendix B - API Walk Through

CoreAPI Walk Trough

The following walks through how to create instances of devices.

  • CoreAPI.createDevice à IDevice

  • CoreAPI.getDeviceList à List

  • CoreAPI.createPPSCRA à MTPPSCRA

These examples demonstrate methods for creating an IDevice to be used in the MagTek Universal SDK. This also shows how to establish a device specific API, which is not used with the MagTek Universal SDK.

Here, a single IDevice is established.

// Access MMS with Universal SDK using createDevice()

IDevice mtmms = CoreAPI.createDevice( 
    context,
    DeviceType.MMS, 
    ConnectionType.USB, "",
    "",
    "DynaFlex", 
    "");
mtmms.requestSignature();

Here, a list of IDevice is established. The first device is accessed at index 0.

IDevice Walk Through

The following walks through how to make use of IDevice.

  • Implement device events within the class to receive events.

  • CoreAPI à IDevice.

  • IDevice à subscribeAll().

  • IDevice à other functions.

  • IDevice à startTransaction().

Example

Handling Events

Application Main window may extent the

Static members

Static
Member
Value
Description

NFC_MIFARE_ULTRALIGHT

String

"nfc_mifare_ultralight"

MIFARE_CLASSIC_1K

String

"mifare_classic_1k"

MIFARE_CLASSIC_4K

String

"mifare_classic_4k"

MIFARE_DESFIRE_LIGHT

String

"mifare_desfire_light"

MIFARE_MINI

String

"mifare_mini"

MIFARE_PLUS_EV1

String

"mifare_plus_ev1"

MIFARE_PLUS_EV2

String

"mifare_plus_ev2"

MIFARE_PLUS_SE

String

"mifare_plus_se"

MIFARE_PLUS_X

String

"mifare_plus_x"

MIFARE_DESFIRE_EV1

String

"mifare_desfire_ev1"

MIFARE_DESFIRE_EV2

String

"mifare_desfire_ev2"

MIFARE_DESFIRE_EV3

String

"mifare_desfire_ev3"

MDL

String

"mdl"

TAG_REMOVED

String

"tag_removed"

FAILED

String

"failed"

IO_FAILED

String

"io_failed"

AUTHENTICATION_FAILED

String

"authentication_failed"

PersonalInfoEntry

These constructors initialize a PersonalInfoEntry object.

  • Call startPersonalInfoEntry().

  • At OnEvent():TouchscreenPersonalInfoEntry, build the object.

Member
Description

deviceType

Type of device.

dataBytes

Data to pass in after set from OnEvent().

data()

Returns the data payload.

dataType()

Returns the capture type.

encrypted()

Returns the encryption status. false = data is not encrypted true = data is encrypted

encryptionType()

Returns the encryption type.

ksn()

Returns the Key Serial Number.

Return Value:

Returns an instance of PersonalInfoEntry.

IEventSubscriber Delegates or can be extended by a separate class. This example uses a separate class and demonstrates how to parse for the various event types.

Example

Various events are separately shown below

IDeviceControl Walk Through

The following walks through how to make use of IDeviceControl.

  • IDevice --> IDeviceControl.· IDeviceControl à open().

  • IDeviceControl --> other functions.

  • IDeviceControl --> close().

Example

ConnectionInfo Walk Through

The following walks through how to make use of ConnectionInfo.

  • IDevice --> ConnectionInfo.

  • ConnectionInfo --> getAddress()

  • ConnectionInfo --> getConnectionType()

  • ConnectionInfo --> getDeviceType() Example

Example

IDeviceCapabilities Walk Through

The following walks through how to make use of IDeviceCapabilities.

  • IDevice à IDeviceCapabilities.

  • IDeviceCapabilities à BatteryBackedClock() to check if date/time should be set.

  • IDeviceCapabilities à PaymentMethods() to check card types supported.

  • IDeviceCapabilities à other functions.

IDeviceConfiguration Walk Through

The following walks through how to make use of IDeviceConfiguration.

  • IDevice --> getDeviceConfiguration().

  • IDeviceConfiguration --> updateFirmware().

  • IDeviceConfiguration --> getConfiguration().

  • IDeviceConfiguration --> setConfiguration().

  • IDeviceConfiguration --> other functions.

Example

Handling Events

Application Main window may extent the IConfigurationCallback Delegates or can be extended by a separate class. This example uses a separate class and demonstrates how to parse for the various events.

Example