I'll open a pull request for NFCTag.js on the weekend.
About downloading arbitrary data using NFC:
It's generic and works for text, images, js... for this reason the data is wrapped in a NDEF MIME Record. Andoird features an API for wrap und unwrap.
Wrap and unwrap is missing from Pucks JS-Engine, namely:
Parse and skip NDEF Message Header. (Usually 2 or 4 bytes)
Parse and skip NDEF MIME-Record Header. (Here length greatly depends on the payload type string e.g. "text/javascript" is already 15 bytes on it's own.)
If there is interest I would invest some time into a MIME record wrap unwrap module.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I'll open a pull request for
NFCTag.js
on the weekend.About downloading arbitrary data using NFC:
It's generic and works for text, images, js... for this reason the data is wrapped in a NDEF MIME Record. Andoird features an API for wrap und unwrap.
Wrap and unwrap is missing from Pucks JS-Engine, namely:
If there is interest I would invest some time into a MIME record wrap unwrap module.