com.pax.dal

Interface IMag



  • public interface IMag
    关于磁条卡的API。 如果开启权限检查,需在AndroidManifest下添加权限:"com.pax.permission.MAGCARD"
    API for Magnetic stripe cards. If permission check is enabled, you need to add permission under AndroidManifest: "com.pax.permission.MAGCARD".
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void close()
      关闭读卡器
      Close Magnetic Stripe Card Reader
      boolean isSwiped()
      检查是否刷过卡
      Check whether a card is swiped
      void open()
      打开读卡器
      Open Magnetic Stripe Card Reader
      TrackData read()
      读取磁卡缓冲区的1、2、3磁道的数据
      Read data of track 1, 2, 3 from magnetic stripe card buffer.
      TrackDataByte readByte()
      读取磁卡缓冲区的1、2、3磁道的数据
      Read data of track 1, 2, 3 from magnetic stripe card buffer.
      TrackDataByte readByteExt()
      读取磁卡缓冲区的1、2、3磁道或JIS-II磁道的数据。
      Read data of track 1, 2, 3 or JIS-II from magnetic stripe card buffer.
      TrackData readExt()
      读取磁卡缓冲区的1、2、3磁道或JIS-II磁道的数据。
      Read data of track 1, 2, 3 or JIS-II from magnetic stripe card buffer.
      void reset()
      复位磁头,并清除磁卡缓冲区数据
      Reset magnetic stripe card reader, and clear buffer of magnetic stripe card.
      void setup(byte flag)
      磁卡功能设置:是否返回磁卡错误码。设置有效周期:设置后直到机器重启或下一次重新设置新的值。
      Magnetic card function Settings: whether to return magnetic card error code.