SmartPos SDK for Android 1.4.1

Public Member Functions | Static Public Attributes
com.paydevice.smartpos.sdk.magneticcard.MagneticCardManager Class Reference

Class of MagneticCardManager (Magnetic Card Reader) implement. More...

## Public Member Functions
void | init () throws SmartPosException
| Initialize magneticcard reader. More...
void | deinit ()
| Deinitialize magneticcard reader. More...
int | query () throws SmartPosException
| To query the data status. More...
byte[] | getTrack (int trackId) throws SmartPosException
| To get the track byte array by track id. More...
int | getInterfaceType () throws SmartPosException
| To get the interface type of magnetic card reader. More...

## Static Public Attributes
static final int | MCR_TYPE_UART = 0
static final int | MCR_TYPE_SPI = 1
static final int | MCR_ERR_INIT = 1
static final int | MCR_ERR_DEINIT = 2
static final int | MCR_ERR_NO_INIT = 3
static final int | MCR_ERR_ALREADY_INIT = 4
static final int | MCR_ERR_PARAM = 5
static final int | MCR_TRACK_ID1 = 1
static final int | MCR_TRACK_ID2 = 2
static final int | MCR_TRACK_ID3 = 3
static final int | MCR_ERR_CODE_PREAMBLE = 0x51
static final int | MCR_ERR_CODE_POSTAMBLE = 0x52
static final int | MCR_ERR_CODE_LRC = 0x53
static final int | MCR_ERR_CODE_PARITY = 0x54
static final int | MCR_ERR_CODE_BLANK_TRACK = 0x55
static final int | MCR_ERR_CODE_STX_ETX = 0x61
static final int | MCR_ERR_CODE_CLASS_FUNCTION = 0x62
static final int | MCR_ERR_CODE_BBC = 0x63
static final int | MCR_ERR_CODE_LENGTH = 0x64
static final int | MCR_ERR_CODE_NO_DATA = 0x65
static final int | MCR_ERR_CODE_OTP_WRITE_FULL = 0x71
static final int | MCR_ERR_CODE_OTP_WRITE = 0x72
static final int | MCR_ERR_CODE_OTP_CRC = 0x73
static final int | MCR_ERR_CODE_OTP_EMPTY = 0x74
static final int | MCR_SWIPE_CARD_PRESENT = KeyEvent.KEYCODE_PROG_GREEN

## Detailed Description

Class of MagneticCardManager (Magnetic Card Reader) implement.

## Member Function Documentation

## ◆ deinit()

void com.paydevice.smartpos.sdk.magneticcard.MagneticCardManager.deinit | ( |  | ) |

Deinitialize magneticcard reader.

Returns

## ◆ getInterfaceType()

int com.paydevice.smartpos.sdk.magneticcard.MagneticCardManager.getInterfaceType | ( |  | ) | throws SmartPosException

To get the interface type of magnetic card reader.

Returns
  interface type

## ◆ getTrack()

byte [] com.paydevice.smartpos.sdk.magneticcard.MagneticCardManager.getTrack | ( | int | trackId | ) | throws SmartPosException

To get the track byte array by track id.

Parameters

  trackId | track id

Returns
  track byte array

## ◆ init()

void com.paydevice.smartpos.sdk.magneticcard.MagneticCardManager.init | ( |  | ) | throws SmartPosException

Initialize magneticcard reader.

Returns

## ◆ query()

int com.paydevice.smartpos.sdk.magneticcard.MagneticCardManager.query | ( |  | ) | throws SmartPosException

To query the data status.

Returns
  0:have data -1:not data or data format error

The documentation for this class was generated from the following file:

- src/com/paydevice/smartpos/sdk/magneticcard/MagneticCardManager.java