[00:00]
- With the Ignition Perspective App, we can utilize various built-in features of your mobile device, such as near field communications, or NFC. Most mobile devices are set to automatically scan for NFC tags, but Ignition Perspective projects can pull that information in and use the data in some way. Here I have a simple view with a Button and a Label. The Label has a binding on its text property, and it is looking at the NFC data tag that I've set up. On my Button's onClick event I then have a Scan Ndef NFC Action. Like I mentioned earlier, most mobile devices continuously scan for NFC tags anyways. What this action allows us to do is it allows us to capture the data within the NFC tag and use it some meaningful way instead of doing the default behavior of that NFC tag. The mode property determines how we want to scan. Single will capture a single NFC tag scan before reverting back to the mobile device's default behavior. While the continuous mode will continuously capture all NFC tag events until it is stopped by the similar Off mode action. In which case, it will revert back to the mobile device's default behavior. Now when we capture the data from the NFC tag, we need to do something with it. We can actually build a script that determines how we handle that data. This script is configured in our session events. So I'm going to go up into my Project menu and go down to the Session Events option. You can see here I have a simple event, where I can pull the data out of the NFC tag. The NFC tag that I have here with me typically takes the user to the demo project that we have set up. However, because I'm capturing this data, what I'm doing instead is I'm extracting the string output from that NFC tag. So it's simply going to display the path to the demo project. I'm then writing that to my NFC data tag. Let's go ahead and give this a shot. Now I do have an emulator set up, however because I have a physical NFC tag, I can't actually show you the tag being scanned by this phone. However, I have my physical phone that's looking at this Perspective project as well, and if I scan the NFC tag with my phone, you can see that the Label updates to show the information that was held within the NFC tag, which in this case is the path to the demo project. Like barcodes, these NFC tags can be placed around your facility at different points that hold information that you can pull in and push to tags or put it in a database.