A custom-made user interface in Qt Quick uses a model to store the chat- and status messages and a simple listview to show them on the screen. The C++ class NfcPeerToPeer takes care of listening for NFC targets and establishing a LLCP socket connection to the client. A LLCP server is waiting for incoming connections at a specified URI and then provides a socket to send data to the client.
The C++ class is used from within the QML code and can be easily controlled – sending text to the other device is done using a slot. Both received messages and status messages are emitted using signals. In case the connection to the second device is lost, the application caches the message and sends it as soon as the link is re-established.
Click below to download
(N8FanClub.com)Nfc Chat v1.1 S^3 Anna Signed.zip