ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / NFC functions
  • Overview
  • Use cases
  • Implementation
  • Necessary conditions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Overview
NFC (Near Field Communication) is a wireless communication technology at short range and high frequency used to exchange data (named "tag") between two devices or between a device and a bullet even at short distance (few centimeters).
NFC technology is an extension of RFID: the main differences lie in the shorter communication distance (around ten centimeters for NFC alone) and the greater volume of data exchanged (40 bytes for most RFID tags and up to 8 kb for NFC tags).
NFC authorizes a wide range of uses, some of which are directly related to contactless cards (ticketing, payment, access, etc.), while others are based on the interaction of the individual with his or her environment: objects, people.
  • Card emulation mode:
    In passive card emulation mode, the mobile device behaves like a contactless smart card.
    Android This mode is not supported at the moment on the Android devices.
  • Reader/writer mode:
    The device becomes a reader for contactless smart cards (active mode) and RFID tags (electronic tags). This mode allows you to read information by moving your cell phone in front of electronic tags placed in the street, on bus shelters, monuments, posters, etc., or on packages, products or your business card (vCard), ...
    It is also possible to write the content of these tags from the mobile device.
  • Peer-to-peer mode:
    This mode allows two devices to exchange information, e.g. vCards, photos, videos, money, tickets, etc. A device equipped with the NFC technology can exchange information with contactless smart cards but also with other devices equipped with this technology.

Use cases

  • Payment using a contactless credit or debit card or a mobile device (cell phone, laptop, tablet, etc.) with a contactless payment terminal.
  • Payment for parking at a terminal that accepts contactless payment using your NFC phone.
  • Buying and validating a transportation ticket or a ticket for a show via a mobile device.
  • Managing the vouchers in a store or a loyalty customer card.
  • Accessing and starting a vehicle via a mobile phone.
  • Reading information about products (price, composition, allergy, etc.) in a store.
  • Checking the access to restricted areas (meeting rooms, company, university, etc.).
  • Exchanging profiles between two users of a social network or between two gamers by "typing" the two phones (peer-to-peer mode).
  • Reading an electronic business card.
  • Synchronizing Internet tags and contacts between a PDA and a cell phone.
  • Retrieving the WiFi key of an access point by moving the "NFC device" near the hotspot.
Implementation
To manage the NFC, WINDEV Mobile proposes:
  • Two types of data to define the tag:
    nfcDataThe nfcData type is used to describe and handle the data of a variable of type nfcTag.
    nfcTagThe nfcTag type is used to define the advanced characteristics of an NFC tag (Near Field Communication).
  • Various functions:
    • Function to find out the status of the sensor:
      NFCStatusReturns the activation status of the NFC sensor found on the device.
    • Functions to read and write the NFC tags:
      NFCReadTagStarts reading an NFC tag or enables the detection of NFC tags for the current window.
      NFCWriteTagStarts writing data to an NFC tag.
    • Function to establish a "peer-to-peer" communication:
      NFCSendTagSends an NFC tag to another device.
Notes: NFC functions cannot be used in the simulator or emulator.
iPhone/iPad

Necessary conditions

Calling NFC functions modifies the AppIDs of the application in the Apple developer account. It is necessary to activate the "NFC Tag Reading" App ID.
Minimum version required
  • Version 18
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help