Background NFC tag reading using Volt MX IRIS platform

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.

  1. Create a Native app

  2. 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 value

    2.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.

  3. Configure Home Form
    Drag and drop the label widget and change text to “Welcome Home”.

  4. 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.

  5. 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)

  6. 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.