AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Comunicación / Funciones NFC
  • Properties specific to nfcTag variables
  • Main remarks
  • Reinitializing the variable
  • List of functions that use the nfcTag variables
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
The nfcTag type is used to define the advanced characteristics of an NFC tag (Near Field Communication). The characteristics of this NFC Tag can be defined and modified using various WLanguage properties.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Ejemplo
Android
// Write a URL into an NFC tag
tag is nfcTag
url is nfcData
url.Type = nfcURI
url.Content = "www.pcsoft.com"
Add(tag.Data, url)
NFCWriteTag(tag)
IF ErrorOccurred THEN
	Error("Unable to write NFC tag.", ErrorInfo())
END
Android
tag is nfcTag = NFCReadTag()
TagID is string = StringFormat(BufferToHexa(tag.Identifier), ...
				ccUpCase + ccIgnorePunctuationAndSpace)
Propiedades

Properties specific to nfcTag variables

The following properties can be used to handle an NFC tag:
Property nameType usedEffect
DataArray of nfcDataArray containing:
  • the data read in an NFC tag (after a call to NFCReadTag).
  • Android the data to write into an NFC tag (after a call to NFCWriteTag).
IdentifierBinary bufferIdentifier of the NFC tag (corresponds to "hardware identifier" of a badged tag). This identifier is automatically filled after a read operation.
This property is available in read-only.
iPhone/iPad This information is not available.
MaxSizeIntegerMaximum size (in bytes) of the data that can be stored in the NFC tag.
This property is automatically filled after a read operation.
This property is available in read-only.
iPhone/iPad This property is not available.
ReadOnlyBoolean
  • True if the tag is read-only,
  • False if it is not protected in write mode.
During a read operation, this property is automatically filled.
During a write operation, if the ReadOnly property is set to True, the tag will be automatically write-protected: it will no longer be possible to modify its data.. This operation is irreversible. Some NFC tags do not support this mode. For more details, see the help about NFCWriteTag.
iPhone/iPad This property always corresponds to True. Indeed, only the read operation is managed.
TypeInteger constantType of tag corresponding to one of the following values:
  • nfcUnknown unknown type. Default value if no read operation was performed with the tag.
  • nfcMifareClassic: NFC Mifare Classic
  • nfcType1 NFC Forum Type 1
  • nfcType2 NFC Forum Type 2
  • nfcType3 NFC Forum Type 3
  • nfcType4 NFC Forum Type 4
The type of tag is automatically filled after a read operation.
This property is available in read-only.
iPhone/iPad This property is not available.
Observaciones

Main remarks

  • The NFC functions support the tags corresponding to the standardized types 1 to 4 defined by the NFC Forum (http://www.nfc-forum.org/specs/spec_list/) and they can only read and write data encoded to the NDEF format (NFC Data Exchange Service).
  • The NFC functions cannot be used in the simulator or in the emulator.
iPhone/iPad Only the read operation is managed.

Reinitializing the variable

You can use VariableReset to reset the content of a variable of type nfcTag.

List of functions that use the nfcTag variables

NFCReadTagStarts reading an NFC tag or enables the detection of NFC tags for the current window.
NFCSendTagSends an NFC tag to another device.
NFCWriteTagStarts writing data to an NFC tag.
Versión mínima requerida
  • Versión 18
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local