读卡器 SDK 文档
概述
该 SDK 封装了读卡器功能,包括设备连接、断开、读卡、写卡等功能。
使用方式
引入依赖
首先需要在项目中添加私有仓库地址,然后在项目的 build.gradle 文件中添加如下依赖:
dependencies {
implementation 'cn.com.shine.sdk:readcard:1.7.4'
}
获取读卡器实例
ReaderFactory readerFactory = ReaderFactory.getInstance();
IReader reader = readerFactory.getReader(context);
读 RFID 卡
IReader.class
String readRFIDCard(int sector, int block, int passwordType, String password);
| 参数 | 描述 |
|---|---|
| sector | 扇区号 |
| block | 块号 |
| passwordType | 密码类型 |
| password | 密码 |
读身份证
IReader.class
IDInfo readIDCard();
| 返回值 | 描述 |
|---|---|
| IDInfo | 身份证信息 |
读社保卡
IReader.class
SocialSecurityInfo readSocialSecurityCard();
| 返回值 | 描述 |
|---|---|
| SocialSecurityInfo | 社保卡信息 |