NFC Component

The NFC component (Near Field Communication) can detect NFC tags on a device that is NFC enabled. Android devices come with an NFC reader inbuilt. Use an NFC component so that when a user scans an NFC tag  it will invoke an action on their device, e.g. notify customer of special pricing on a product.

Tutorial on how to set up an NFC Component

Tutorial on using NFC Component

Setting up an NFC Component

NOTE: these work on android devices only

  • Go to large plus button to the right of your project name – this opens the Component Selector
  • Go to the IoT tab
  • Insert an NFC Component
  • NFC component has no Properties
  • NFC component has no Action States

Setting up an NFC Item

The NFC component requires at least one NFC Item. NFC items get set up to recognize each NFC tag, or class of tag using regular expressions (described below). The benefit of having a group of tags under one item is that you could have 10,000 products all managed by the same item.

NFC Items have 2 Properties to set:

ID ID/serial number of a NFC tag you want your app to recognize.
Example 113a440c or 11:3a:44:0c
This non-write ID property/serial number of the NFC tag hardware. Using a NFC reader app such as “NFC tools” you can read this number.
Command The NFC tag text field you want your app to recognize.
This is a writable text field of a NFC tag. Not all NFC tags have this field. In some cases the text field may have been written then set to read-only. Again to read/write/lock this field (if present) on your NFC tag you can use a NFC reader such as “NFC tools”.

Either one or both of these can be set to cause app NFC tag recognition.
Secured recognition: set the ID property of the NFC component item using the Serial Number of the NFC tag e.g, 113a440c or 11:3a:44:0c
-or-
Flexible recognition: set a text in the NFC tag and use this as the Command property of the NFC component item
-or-
Use both in situations when you might want to have secured recognition but still be able to change the Command property text NFC tag in order to bar recognition temporarily.

Regular expressions power these fields so you can use “.+” to represent anything in either ID or Command fields. Use “^j.” to find any command starting with the letter j. Another example would be “.j$” to find any command ending with the letter j. To find out more about regex, look online. Here is a link to the wikipedia page: https://en.wikipedia.org/wiki/Regular_expression

NFC items have 1 Action event:

On Recognize

You can add actions/navigation to the app when the correct labelled NFC tag is recognized. Choose from the categories list in the Action Selector. Often a text popup with extra product information or special price offers will be displayed or maybe a link to a website or a gallery display of related products.

Using [command] and [id] you can insert the information from the NFC tag into any actions that you trigger on this event.