diff options
author | Alex Blasche <alexander.blasche@theqtcompany.com> | 2016-06-02 13:56:50 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@theqtcompany.com> | 2016-06-06 09:17:50 +0000 |
commit | 5e8994a4fa83f4c2795978f8b9ae893cefc69160 (patch) | |
tree | 071e3a2a68ec818edcb9010a39dfbe642d88772c /examples/nfc/poster/doc | |
parent | 3e4236996d0d961bb91d30eff10e9b2aa8b7d4a7 (diff) |
Make it more obvious what tags the NFC poster example expects.
Task-number: QTBUG-53616
Change-Id: Ie3a87abc61100ac8fe0a5b671725f54ae28e1501
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'examples/nfc/poster/doc')
-rw-r--r-- | examples/nfc/poster/doc/images/qml-poster-example.png | bin | 5110 -> 7946 bytes | |||
-rw-r--r-- | examples/nfc/poster/doc/src/poster.qdoc | 21 |
2 files changed, 20 insertions, 1 deletions
diff --git a/examples/nfc/poster/doc/images/qml-poster-example.png b/examples/nfc/poster/doc/images/qml-poster-example.png Binary files differindex d3ead72e..8ed2292c 100644 --- a/examples/nfc/poster/doc/images/qml-poster-example.png +++ b/examples/nfc/poster/doc/images/qml-poster-example.png diff --git a/examples/nfc/poster/doc/src/poster.qdoc b/examples/nfc/poster/doc/src/poster.qdoc index a569f47a..26320f56 100644 --- a/examples/nfc/poster/doc/src/poster.qdoc +++ b/examples/nfc/poster/doc/src/poster.qdoc @@ -31,7 +31,7 @@ \brief A QML example about reading and displaying NFC Data Exchange Format (NDEF) messages. The QML Poster example displays the contents of specifically formatted NFC Data -Exchange Format (NDEF) messages read from an NFC Tag. The NDEF message should +Exchange Format (NDEF) messages read from an NFC Tag. The NDEF message must contain a URI record, an optional \c image/* MIME record, and one or more localized Text records. @@ -39,5 +39,24 @@ localized Text records. \include examples-run.qdocinc +\section1 Applying NDEF Filters + +The example is designed to display the content of a very specific type of NFC tag. +The tag must contain at least one URI record and one text record. If those two +record types do not exist, nothing will happen. Such filtering is applied via the +\l NearField type's filter property. The property accepts a list of \l NdefFilter objects. + +\snippet poster/poster.qml QML NDEF filtering + +\section1 Processing Found NDEF Messages + +Once an appropriate tag is found, the \l NearField::messageRecords property reflects the content. +It transports the list of found NDEF records. The QML snippet below +demonstrates how these records can be accessed: + +\snippet poster/poster.qml messageRecordsChanged 1 +\snippet poster/poster.qml messageRecordsChanged 2 +\snippet poster/poster.qml messageRecordsChanged 3 + \sa {Qt NFC} */ |