|
|
|
|
|
- Operating mode
- Reading the NFC sent
- Required permissions
- Application in the background: Specific case from Android 10
NFCSendTag (Function) In french: NFCEnvoieTag
Warning
From version 2024, this feature is no longer available.
Sends an NFC tag to another device. Note: NFC functions cannot be used in the simulator or emulator.
tag is nfcTag
url is nfcData
url.Type = nfcURI
url.Content = "www.pcsoft.com"
Add(tag.Data, url)
IF NFCSendTag(tag) = False THEN
Error("Echec de l'écriture sur le tag NFC.", ErrorInfo())
END
Syntax
<Result> = NFCSendTag(<Tag>)
<Result>: Boolean - True if the sending was performed,
- False otherwise. If an error occurs, the ErrorOccurred variable is set to True. To get more details on the error, use ErrorInfo.
<Tag>: nfcTag variable Name of the nfcTag variable that describes the data to be sent. Remarks Operating mode - The NFC tags are sent by the Android Beam feature of the device. This feature must be enabled on the transmitter device and on the receiver device.
The Android Beam feature is enabled in the window for configuring the wireless communications. - The call to NFCSendTag automatically opens a window to prompt the users to hold their devices closer to another NFC-enabled device. This window will be automatically closed:
- when the sending is over,
- if the user cancels the sending by pressing the Back key of the device.
Note: To personalize the message displayed in this window, use the NextTitle function before calling the NFCSendTagfunction. .
- On the destination device, the tag sent can be read like a standard NFC tag:
- by an application developed with WINDEV Mobile by using NFCReadTag,
- by a compatible external application.
Reading the NFC sent For a device to read the NFC tag sent by NFCSendTag, it must support: - the NDEF Push Protocol (com.android.npp),
- the SNEP protocol (Simple NDEF Exchange Protocol).
If it is running version 4.0 or later, it must support the two protocols. Required permissions This function changes the permissions required by the application. Required permissions: - NFC: Enables applications to perform input/output operations using NFC technology.
- VIBRATE: Accesses the vibrate function.
Component: wd300android.jar
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|