Volt IRIS supports reading and writing NFC tags. In this article we will cover how to read the NFC tags while application not running using IRIS application.
-
Create a Native app
-
Configure NFC for your project
2.1. Add Android NFC capability.
Open Project Settings → select Native Tab → select Android Mobile/Tablet → In Manifest Permissions (Permission Tab) → add NFC and click Done.2.2. Add iOS NFC capability.
Open Project Resources/common/quantum_nitro_configuration.json and add NFC entitlement.2.3 Add NFC usage description for iOS
Open Project Resources/common/infoplist_configuration.json and add NFCReaderUsageDescription key and value2.4 Add associated domain in Capability for iOS.
Open Project Resources/common/quantum_nitro_configuration.json and add associated domain with applink.
Note: This step allows link the app using associated domain. -
Configure Home Form
Drag and drop the label widget and change text to “Welcome Home”.
-
Create new form and Configure Form to show background tag read result
Drag and drop the label widget and will set data from app service callback.
-
Configure App service callback
Select Mobile in Project explorer. Configure appservice of IRIS right side property window.
When app launched from NFC tag, you receive voltmx.application.APP_LAUNCH_MODE_NFC_DATA as launch mode. And you can save tag data in any global variable (nfcTagData in below screenshot)
-
Build and Run the app. Then close (Kill) the application to see your application is capable of reading NFC Tag in background.
Note:
- The tag must have app group link record for iOS
- The tag must have application record for android.