How to use Javascript API to read NFC

Aug 13, 2014 at 2:02 AM
I download Javascript API and did a lot of test, I really do not know how it works. I saw the document about Javascript API, there is nothing about reading NFC.Can you give me a sample about how to read NFC using javascript API?
Aug 13, 2014 at 8:59 AM
For actually reading NFC from a physical tag, you need to use an API provided by your platform. The NDEF library is only here to parse the actual NDEF messages found on NFC tags - but the actual interface to the physical hardware through device specific device drivers is a task that has to be handled by the operating system.
You can find samples of how to parse NDEF messages in the unit test files in the "tests" directory. We are also working on a WinJS-based example app that showcases the library based on the WinRT Proximity APIs, which handle the interface to the NFC hardware.
Aug 14, 2014 at 4:51 AM
Thank you for your answer, I really appreciate it.
I am a new guy on NFC develop. So it really take me a lot of time to do some research. I have no idea about the NFC hardware interface. I wonder if you can give me the example about handling the interface to the NFC hardware.
Aug 14, 2014 at 8:25 AM
Which platform are you working on? In case you are using Windows 8, you can download a Javascript example of how to use the JavaScript Proximity APIs here:
The example demonstrates how to use the functionality that comes with the OS; you can then include the library to gain access to a lot more features of the NDEF standard!