简体   繁体   English

使用Android设备的NFC通过网络应用读取Mifare卡

[英]Reading Mifare card via web app using Android device's NFC

I want to find out if this is possible, to have a web app read off information from a Mifare card, by tapping the card against a NFC-enabled Android device. 我想找出一个可行的方法,让网络应用程序通过在支持NFC功能的Android设备上点击Mifare卡来读取信息。

I have been searching this for quite some time, and it seems like as of now it's only limited to experimental implementation - https://whatwebcando.today/nfc.html 我已经搜索了很长时间,到目前为止,它似乎仅限于实验性实施-https://whatwebcando.today/nfc.html

Or am I truly better off with a native Android app? 还是使用原生Android应用,我真的过得更好吗?

Edit: Thanks to all who replied. 编辑:感谢所有答复。 We have been trying out the Web NFC API as specified here https://w3c.github.io/web-nfc/ , turned on the experimental features of Chrome on the Android device, but it always return a null value when we tap the Mifare card on the device. 我们一直在尝试按此处指定的Web NFC API https://w3c.github.io/web-nfc/ ,在Android设备上启用Chrome的实验功能,但是当我们点击Chrome浏览器时,它始终返回null值。设备上的Mifare卡。 Are we missing out any steps, or is it really a technical limitation of the API at this moment, since it's still not considered as a stable specification? 我们是否遗漏了任何步骤,或者由于它仍然不被认为是稳定的规范,目前它是否真的是API的技术限制?

I think on mid-term even WebNFC will be restricted to (reading & writing) NDEF messages, similar to what Apple is currently doing on iOS. 我认为从中期来看,甚至WebNFC都将被限制(读取和写入)NDEF消息,类似于Apple当前在iOS上所做的事情。 So if you want to read info like UID or raw data out of a MIFARE card, you need to write a native app. 因此,如果您想从MIFARE卡中读取UID或原始数据之类的信息,则需要编写一个本机应用程序。 Be aware that MIFARE (Classic) is not supported by all phones, even when they have NFC. 请注意,即使具有NFC功能,也不是所有电话都支持MIFARE(经典)。 If you want to use a framework like ionic or Cordova, you can also use the NDEF plugin ( https://github.com/chariotsolutions/phonegap-nfc ) 如果要使用ionic或Cordova之类的框架,也可以使用NDEF插件( https://github.com/chariotsolutions/phonegap-nfc

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM