Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
nfc-index.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2013 Aaron McCarthy <mccarthy.aaron@gmail.com>
2
// Copyright (C) 2021 The Qt Company Ltd.
3
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
4
5
/*!
6
\page qtnfc-index.html
7
\title Qt NFC
8
\brief Enables connectivity between NFC enabled devices.
9
\ingroup technology-apis
10
11
The NFC API provides connectivity between NFC enabled devices.
12
13
Currently, the API is supported on \l{Qt for Android}{Android}, \l{Qt for
14
iOS}{iOS} and \l{Qt for Linux}{Linux} using
15
\l {https://github.com/linux-nfc/neard}{Neard} v0.14 or later.
16
This module also provides limited access to readers supporting
17
\l{PC/SC in Qt NFC}{PC/SC} specification on Linux, macOS, and Windows.
18
19
NFC is a short-range (less than 20 centimeters) wireless technology
20
with a maximum transfer rate of 424 Kbps. NFC is ideal for transferring
21
small packets of data when two devices are placed together.
22
23
The NFC module provides APIs for interacting with NFC Forum Tags and NFC Forum
24
Devices. It can detect targets and losses, register NDEF message handlers, read
25
and write NDEF messages on NFC Forum Tags, and send tag-specific commands.
26
27
\section1 Using the Module
28
29
\include {module-use.qdocinc} {using the c++ api} {NFC}
30
31
\section2 Building with CMake
32
33
\include {module-use.qdocinc} {building with cmake} {Nfc}
34
35
\section2 Building with qmake
36
37
\include {module-use.qdocinc} {building_with_qmake} {nfc}
38
39
\section1 Articles and Guides
40
41
\list
42
\li \l {Qt NFC Overview}
43
\li \l {Supported NFC Features}
44
\li \l {Qt NFC on Android}
45
\li \l {PC/SC in Qt NFC}
46
\endlist
47
48
\section1 Logging Categories
49
50
The \l QtNfc module exports the following
51
\l {Configuring Categories}{logging categories}:
52
53
\table
54
\header
55
\li Logging Category
56
\li Description
57
\row
58
\li qt.nfc.neard
59
\li Enables logging of the Neard/Linux implementation
60
\endtable
61
62
\section1 Examples
63
64
\list
65
\li \l {annotatedurl}{Annotated URL}
66
\li \l {ndefeditor}{NDEF Editor}
67
\endlist
68
69
\section1 Reference
70
71
\list
72
\li \l {Qt NFC C++ Classes}{C++ Classes}
73
\endlist
74
75
\section1 Security Considerations
76
77
The content of an NFC tag cannot be treated as a trusted input. It's the
78
application developer's responsibility to validate the data before using it.
79
80
\section2 URIs
81
82
Functions such as \l QNdefNfcUriRecord::uri() and
83
\l QNdefNfcSmartPosterRecord::uri() return URIs decoded directly from tag
84
content. Applications can, for example, verify that the scheme is one the
85
application expects to receive (for example, \c https rather than \c file
86
or \c javascript) before opening, loading, or acting on a returned URI.
87
88
\section2 Icon Data
89
90
Functions such as \l QNdefNfcIconRecord::data() and
91
\l QNdefNfcSmartPosterRecord::icon() return raw byte arrays containing icon
92
data embedded in the tag. Since the MIME type and content are both provided
93
by the tag author, the actual bytes may not conform to the claimed type.
94
95
Applications should verify the result after decoding rather than assuming the
96
data is valid. As an example, passing the data directly to \l QImage is
97
generally safe, as it handles validation. However, it is advised to perform
98
additional validation when processing the data manually or using non-Qt tools.
99
100
\section1 Module Evolution
101
102
\l {Changes to Qt NFC} lists important changes in the module API and
103
functionality that were done for the Qt 6 series of Qt.
104
105
\section1 Licenses
106
107
Qt NFC is available under commercial licenses from \l{The Qt Company}.
108
In addition, it is available under free software licenses. Since Qt 5.4,
109
these free software licenses are
110
\l{GNU Lesser General Public License, version 3}, or
111
the \l{GNU General Public License, version 2}.
112
See \l{Qt Licensing} for further details.
113
*/
qtconnectivity
src
nfc
doc
src
nfc-index.qdoc
Generated on
for Qt by
1.16.1