flutter - 用 nfc_manager 获取卡数据?
问题描述
我正在使用 nfc_manager 包来扫描我的交通卡。我在 Playstore 上发现了类似的应用程序,它们能够从应用程序中获取交易历史记录、卡序列号和其他详细信息。但是,使用 nfc_manager 包,我只能获得 isodep 和 nfcB 数据。下面是 isoep 和 nfcb 数据的打印输出。
{identifier: [123, 123,123,123], hiLayerResponse: [], historicalBytes: null, isExtendedLengthApduSupported: true, maxTransceiveLength: 12312, timeout: 123}
{identifier: [123,123,123,123], applicationData: [0, 0, 0, 0], maxTransceiveLength: 123, protocolInfo: [123,123,123]}
(值已更改为 123,因为我不确定数据是否敏感)我如何从我这里的数据中获取诸如运输历史之类的数据?或者这是包装的限制?
这是使用的代码:
NfcManager.instance.startSession(onDiscovered: (NfcTag tag) async {
print(tag.data['isodep']);
print(tag.data['nfcb']);
IsoDep isoDep = IsoDep.from(tag);
print(isoDep.historicalBytes);
});
谢谢您的帮助!
解决方案
推荐阅读
- python - 如何以字节为单位转换pyplot图像
- swift - 如果在tableView swift中取消选择它,如何删除数组中的项目
- c# - 有没有办法在一起运行多个测试时在单元测试用例中模仿 startup.cs 的功能?
- python - 在Django中为每个用户自动创建一个文件夹+在该文件夹中保存张量流权重
- ios - safeAreaLayoutGuide 指南不能从另一个视图控制器工作
- node.js - 将图像 (ctrl+v) 粘贴到 ngx-dropzone
- excel - Excel:将表格行移动到另一个工作表的表格
- django - 当订单不允许时如何序列化不同的嵌套序列化
- powerbi - Power BI 根据来自另一列的筛选器比较同一列中的值
- javascript - Moment.js 不适用于动态加载的元素