NearField

Last Updated On 2021-07-16

Version 1MinSDK 7Tutorial Video

Non-visible component to provide NFC capabilities. For now this component supports the reading and writing of text tags only (if supported by the device)

In order to read and write text tags, the component must have its ReadMode property set to True or False respectively.

Note: This component will only work on Screen1 of any App Inventor app.


Properties

You can set the below properties in the UI part of the builder.

  • ReadMode - it's a boolean value which is set to true by default.

Block Properties

You can set the below blocks properties in the blocks section of the builder.

LastMessage

Returns the content of the most recently received tag.


ReadMode

Returns true if in read mode, false if in write mode.


TextToWrite

Returns the content of the text that's going to be written to the tag.


WriteType

Returns the write type for the NFC component. For this version of the component, it is always `1`.



Events

You can set the below event blocks in the blocks section of the builder.

TagRead

Indicates that a new tag has been detected. Currently this is only a plain text tag, as specified in the manifest.

TagWritten

Indicates that a tag has come into range of the NFC sensor and has been written.