NFC vCard

Posted on
  • 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­er-for-iphone/id1249686798?mt=8

    var tag = require("NFCvCard").create("BEGIN:VCARD\­n"+
                                         "FN:John Doe\n"+
                                         "TEL;WORK;VOICE:(111) 555-1212\n"+

    2 Attachments

  • 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..

    1 Attachment

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

NFC vCard

Posted by Avatar for AntiCat @AntiCat