关于微信NFC功能开发的链接总结,不需要你再一篇篇辛苦的找!!

特此申明:若有侵权,请联系我,我会第一时间删除

一. 小程序开发一般流程:

  1. 首先调用 wx.getHCEState(OBJECT), 判断设备是否支持NFC,(ios,android兼容性处理)

  2. 调用 wx.startHCE(OBJECT) 初始化手机的NFC模块;

  3. 初始化完成后,调用 wx.onHCEMessage(CALLBACK) 监听芯片响应的消息;

  4. 点击页面上的“询卡”按钮,调用 wx.sendHCEMessage(OBJECT)发送询卡指令;

  5. 这时 wx.onHCEMessage(CALLBACK) 应该可以收到带有uid信息的芯片响应数据;

  6. 根据uid发送select指令,以及后续多个指令;

  7. 全部操作完成后之后,调用 wx.stopHCE(OBJECT) 停止手机的NFC模块

二. 纯干货来啦! 代码链接,仅供参考!

  1. https://ask.dcloud.net.cn/article/114

  2. https://blog.csdn.net/leifengpeng/article/details/79745481

  3. https://my.oschina.net/u/1413001/blog/4627529

  4. https://ask.dcloud.net.cn/question/6726

  5. https://ask.dcloud.net.cn/question/12942

  6. https://ask.dcloud.net.cn/article/35046

  7. https://ask.dcloud.net.cn/article/35690

  8. https://ask.dcloud.net.cn/article/36376

  9. https://ask.dcloud.net.cn/article/36346

  10. https://github.com/whitedogg13/react-native-nfc-manager(react-native)

  11. http://bbs.wex5.com/forum.php?mod=viewthread&tid=103624

  12. https://stackoverflow.com/questions/41466773/react-native-android-read-nfc-card-id

  13. https://github.com/barodeur/react-native-nfc-ios

  14. https://www.npmjs.com/package/react-native-nfc

三. 你可能用到的参考代码,啥也不说,直接上链接。

  1. https://www.cnblogs.com/itgezhu/p/11037681.html

  2. https://www.phodal.com/blog/arduino-nfc-pn532-dfrobot-pn532-nfc/

  3. http://www.360doc.com/content/11/0524/13/474846_119019554.shtml

  4. https://www.dcloud.io/docs/api/index.html

  5. https://my.oschina.net/PJGc8YMb/blog/3013538

  6. https://blog.csdn.net/ieeso/article/details/106219861(uni-app 利用native调用Android NFC 读取RFID标签的UID)

  7. nctive的SDK调用:

  8. https://developer.blackberry.com/native/reference/core/com.qnx.doc.nfc.lib_ref/topic/nfc_connect.html

  9. 小程序NFC - API:

  10. https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/wx.stopHCE.html

  11. JavaScript 通过native.js 调用Android原生API:

  12. https://blog.csdn.net/su_sai/article/details/51636510

  13. 关于android原生开发:

  14. https://developer.android.google.cn/reference/android/nfc/NfcAdapter

  15. https://blog.csdn.net/weixin_33757609/article/details/92834998

  16. https://blog.csdn.net/qq_26787115/article/details/50831582?_t=t(初次开发应该注意事项:)

  17. 相关插件:

  18. https://www.wenjiangs.com/doc/ion-native-nfc

  19. https://ext.dcloud.net.cn/plugin?id=613

  20. 微信开发公众号页面配置JS-SDK调用微信接口:

  21. https://blog.csdn.net/weixin_38571379/article/details/94577104

  22. https://blog.csdn.net/qq_44868663/article/details/98208407

  23. UNI-APP开发微信公众号(H5)JSSDK调式:

  24. https://blog.csdn.net/ronhsu/article/details/105403448

  25. node.js开发微信公众号:

  26. https://www.cnblogs.com/hvkcode/p/6913033.html

  27. https://coding.imooc.com/class/38.html(视频教程)

posted @ 2020-12-11 09:17  断桥殇残雪余  阅读(532)  评论(0编辑  收藏  举报