Is it possible to access NFC API in HTML5 applications?
Asked Answered
F

3

24

I have a requirement to include NFC Card reader to read associate ID to authenticate the user for a web app displayed in a touch screen.

Is it possible to use SCM NFC reader module for a web-based app.

Is there any plugin that can we included in the client or server side for this purpose ?

Thanks in advance.

Frankly answered 4/4, 2014 at 10:58 Comment(0)
V
27

The Web NFC API (maintained by the NFC Working Group is currently in draft status. This API is intended to provide access to NFC functionality for HTML5.

BUT

  1. In its current version the NFC Web API does not provide any means to get a tags ID/serial numer/anti-collision identifier (I assume that's what you mean with ID, right?). In fact the API will only provide access to NFC tags through the NDEF abstraction layer.
  2. I don't know of any browser release that currently implements the NFC Web API.

UPDATE

The NFC Working Group was closed after its charter expired (mainly due to lack of support by browser vendors) and is no longer maintaining the specification. Instead there is a Web NFC Community Group now that maintains the Web NFC API specification now.

Veriee answered 16/4, 2014 at 20:20 Comment(6)
Actually Firefox OS 2.0 supports the NFC API.Fretted
The whole initiative seems to be abandoned, but I cannot find other API which would cover that. Why did this happen? Mozilla had experimental iimplementation and I see a repo on github for chrome. So frustrating...Undershot
Right. However, there is a communitiy group working on this now: w3.org/community/web-nfcVeriee
Abandoned is not the correct word here. The charter expired after a first draft of the NFC api was published. The community group does however need input from people like you: w3.org/community/web-nfc.Abshier
@MattJensen Well, the charter expired (and consequently the group was closed) due to lack of support by browser vendors. Hence, "abandoned" probably is the right word. Anyways, I've changed the wording.Veriee
@MattJensen I've been monitoring both the working group and now the community group for quite a while. Unfortunately, those who are active in that group don't seem to have much understanding of NFC (or at least a rather weird understanding) which leads to, in my opinion, pretty senseless decisions. Particularly the approach to mapping NFC into browser security models by viewing it as a non-interactive wireless radio technology makes the API pretty useless. After all NFC is user interaction.Veriee
C
6

As an update to the above. The latest Chrome Canary for Android does now support WebNFC. Interestingly, the primary Chrome supports the older protocol of the NFC.watch method which allows for data to be read/written but the new one has changed to NFCReader methods which are promise based which you start and stop. The later allows for reading of the ID. https://w3c.github.io/web-nfc/

Collative answered 24/8, 2019 at 23:33 Comment(0)
U
1

There is an API out there, but there is no browser release supporting this API due to the lack of its development!

Unjust answered 17/2, 2019 at 15:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.