O'Reilly Webcast April 29, 2014
Tom Igoe, Brian Jepson & Don Coleman
Tags hold a tiny amount of data
Think bytes
not kilobytes, megabytes, or gigabytesData for the user application
Indicates the structure of the value of the type field
Identifier describing the type of the Payload
Must follow rules implied by TNF
One or more NDEF Records
Contains a payload of data
Information describing the payload
Adafruit NFC Shield
http://www.adafruit.com/products/789
Seeed Studio NFC Shield
http://www.seeedstudio.com/depot/nfc-shield-v20-p-1370.html
$ cordova create nfc com.example.nfc NFC
$ cd nfc
$ cordova platform add android
$ cordova plugin add \
com.chariotsolutions.nfc.plugin
nfc.addNdefListener(
eventListener,
success,
failure
);
nfc.addNdefListener(
app.onNfc,
success,
failure
);
onNfc: function(nfcEvent) {
var tag = nfcEvent.tag,
ndefMessage = tag.ndefMessage;
alert(JSON.stringify(ndefMessage));
}
util.isType(record, tnf, type);
if (util.isType(rec, TNF_WELL_KNOWN, RTD_URI)) {
value = ndef.uriHelper.decodePayload(payload);
} else if (util.isType(rec, TNF_WELL_KNOWN, RTD_TEXT)) {
value = ndef.textHelper.decodePayload(payload);
} else if // ...
<intent-filter>
<action android:name=
"android.nfc.action.NDEF_DISCOVERED"/>
<data android:mimeType="text/plain"/>
<category android:name=
"android.intent.category.DEFAULT"/>
</intent-filter>
Tom Igoe
Brian Jepson
Don Coleman

Writing NFC Apps with Apache Cordova by Don Coleman
is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Based on a work at https://github.com/don/slides/tree/gh-pages/2014-04-29-oreilly-nfc.