Use the NFC classes to handle near-field communication with other devices.
Near-field communication allows devices to exchange information when they're in close proximity to each other. You can provide NFC support in your apps and exchange NDEF records in various formats, such as text, URI, and smart posters. You can also share content with other NFC-enabled devices or NFC tags, and manage all aspects of this functionality using these classes.
Libraries and permissions
To link against these classes, add the following line to your .pro file:
LIBS += -lbbsystem
If you want to use NFC to share files that are located in shared folders on the device, you must also specify the following permissions in your bar-descriptor.xml file:
To download a code sample that demonstrates how to use NFC, visit the Cascades Samples repository in Github.
- NfcShareError -
The list of notifications provided to the NfcShareManager::error() signal after an unsuccessful attempt to share content via NFC.
- NfcShareManager -
The NfcShareManager class manages all interactions related to sharing files and data over NFC.
- NfcShareSuccess -
The list of notifications provided to the NfcShareManager::finished() signal after successfully sharing content using NFC.