支持的 NFC 功能
Qt NFC 为读写数据提供了两个选项。这些选项反映在AccessMethod 枚举中。
- NdefAccess - 通过readNdefMessages() 和writeNdefMessages() 使用 NDEF 消息。
- TagTypeSpecificAccess - 使用sendCommand() 发送自定义命令,并通过requestResponse() 获取结果。
TagTypeSpecificAccess 这意味着用户可能需要根据 NFC 标签类型发送不同的数据。Qt NFC 识别的标签类型在Type 枚举中定义。
Qt NFC 不同平台对不同访问方法和标签类型的支持各不相同。下表显示了每个平台目前支持的功能子集。
平台 | 识别的标签类型 | NDEF 支持 | 特定标签访问 |
---|---|---|---|
安卓 | Type 枚举中的所有类型 | 是 | 是 |
iOS | 是 | 是 - 适用于支持的标签类型 | |
Linux、Windows、macOS (使用PC/SC 实现) | 是 - 适用于NfcTagType4 | 是 - 适用于ProprietaryTag |
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.