1. 调用 connectTag()接口连接 Tag 设备。
2. 调用 isTagConnected()接口查询 Tag 设备连接状态。
3. 调用 sendData(data)接口发送数据到 Tag。
// 连接 Tag 设备,返回值为是否连接成功
boolean connSuccess = tagNfcA.connectTag();
// 查询 Tag 连接状态
boolean isConnected= tagNfcA.isTagConnected();
// 发送数据到 Tag,返回值为 Tag 的响应数据
byte[] data = {0x13, 0x59, 0x22};
byte[] response = tagNfcA.sendData(data);
xpanx.com
https://xpanx.com/
评论