I've implemented a PoC for NFC vCard support.
My implementation consists of two modules. A NFC card emulation NFCTag.js and a NDEF vCard wrapper NFCvCard.js.
NFCTag: Features READ and WRITE support.
NFCvCard: Its a pretty crude application example for NFCTag that can be altered to support various MIME-Type based NDEF tag types.
I've tested my vCard example below using https://itunes.apple.com/us/app/nfc-reader-for-iphone/id1249686798?mt=8
var tag = require("NFCvCard").create("BEGIN:VCARD\n"+
That's awesome - thanks!
You know there's NRF.nfcRaw? It feels like that should really be doing what NFCTag is (minus the writing, obviously). Is the issue that it already applies a header already?
If so, I wonder how many people actually use nfcRaw - probably none. I should probably change it so that it doesn't apply any header - and then stuff like your vCard implementation could use that (which wouldn't struggle with the potential delays in response if the JS interpreter was busy)
Yes NRF.nfcRaw does also work (see attachment). However the purpose of this one hour project was to demo my low level NFC API, which was recently merged, and test my iPhones NFC feature..
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem