-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get started? #145
Comments
Do I need to join a group to be able to use the script? Does this actually work within a browser, for example if I wanted to read and write an NFC tag, then can I do this using the script? |
Yes, you can read and write to NFC tags using the web-nfc API and Google Chrome. |
Hello and thanks for getting back to me, I have enabled the experimental web platform features in the flags of Chrome, however I can't seem to find the WebNFC? Can you tell me where this is? I have tried downloading the Chrome BETA version and searched in here, and also Chromium. Any ideas? Uncaught TypeError: Cannot read property 'push' of undefined |
Hi! |
The |
Hi, I am currently having the same issues as to integrating this experimental feature into a web app. We wish to use this experimental feature to read off information from a Mifare card via web app using an Android device's NFC. So far we have tried but it always returns a null result, any advice? |
@cheehow Mifare is not NFC but a proprietary technology, which only works on readers (like phones) that come with a NFC chip from NXP. If that is a very valuable use-case, I think we need some discussion on whether we want to support it from W3C point of view, or allow an escape path where browsers could support it but it not being mandated by the spec. |
Hi, does anyone have any guess what I might be doing wrong. |
@tahv0, the introduction says:
Which card you're trying to read from specifically? |
Maybe you are using Mifare (not NFC) tags? These are ONLY readable using NFC readers from NXP (proprietary) - which is why they are not supported on the web. @anssiko maybe we should create a proper error message? like "Proprietary (Mifare) tag detected". Kenneth |
Some student id card. It seems to be NfcA, MifareClassic. Not a Tag. |
Card, tag, etc == passive device, so same thing. Mifare Classic is not following the NFC standard but very similar, proprietary tech which is supposedly cheaper and a good lock to requiring special reader chips. |
@tahv0 I'm trying to use this on a touchscreen desktop computer which has a NFC device connected. WebNFC flag doesn't appear on chrome. Does this only work on smartphones using chrome? |
Don't know, I neither find that documented. It might be that you can only used NFCs on desktop via extension e.g: Note. This WebNFC is experimental feature and it seems that it wont come to browsers in near future. This is a reason why I gave up with this. |
I'm just trying to access NFC device to allow users login on system using NFC card on the web application. Looks like this extension may work, I'll take a look. Otherwise, there are more alternatives? Thanks! |
Having implemented this in production (a very specific usecase where enabling a feature flag is worth it for the convenience), here's a summary of my experience:
FWIW, here's the TypeScript type definitions I used. I can only vouch for the read operations since that's all we ended up using. https://gist.github.com/richardszalay/dd39a3486b6477a126103c6ea354247b |
Hi @richardszalay Thanks for the feedback. We are back at working on this after having landed Generic Sensors. We have modernized the API so expect changes the coming months before we start an origin trial.
Yes, it will only work on platform that has native drivers for NFC (not for plugging in a USB NFC reader etc) - so thus far only Android
True, that was for avoiding finger printing - has that turned out to be an actual problem?
Can you please file a bug at crbug.com/new ? |
No worries, is this related to the
Not at all, just thought it would be worth mentioning to anyone planning on using it.
It was some time ago and I'm not working actively with that feature anymore, but if I can find some time to repro the issue I'll write up a bug. |
It goes straight. https://w3c.github.io/web-nfc/#idl-index
That would be great. Please add the issue links here afterwards |
That was by design IIRC, by default allowing only specific web-nfc tags, and requiring expressed choice by developer to access other tags as well (security policies usually go like this, requiring action for gaining more permission, against convenience; yet APIs try to be convenient, hence a conflict - which should be at least better documented). Thanks for the feedback.
Handling of external/opaque needs to be checked in the implementation. File a bug, please. |
@jvdassen or anyone could tell when the need for enable the WebNFC flag would be unnecessary? |
When Web NFC ships to Chrome stable channel. Maybe this year if the origin trial proves that the shape of the API fits web developers needs. During the upcoming origin trial, the flag won't be necessary as well. Please, stay tuned for more information regarding this. |
To get started with Web NFC, I'd recommend having a look at https://web.dev/nfc/ |
Can someone please advise on how I can integrate this into my website because I can't seem to find a way to implement this. Thanks in advance, all advice and support would be much appreciated.
The text was updated successfully, but these errors were encountered: