summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeter Rustler <peter.rustler@basyskom.com>2015-04-08 10:50:04 +0200
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-04-13 12:17:30 +0000
commit7400567660d1abebb0568d557998a7eb59f1f427 (patch)
tree783b1eb167e36dd9da51dc3dc2853c5830469352 /src
parenta6eada4aec4f029bce178845755fc64f74370c0c (diff)
Added documentation for NFC on Android
Added documentation for NFC for Android and restructured the Blackberry documentation. Change-Id: I6d3a7be11ab6f3f0edf5f6f682fa8d6642629a9c Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/nfc/doc/src/nfc-android.qdoc69
-rw-r--r--src/nfc/doc/src/nfc-blackberry.qdoc52
-rw-r--r--src/nfc/qnearfieldmanager.cpp18
3 files changed, 125 insertions, 14 deletions
diff --git a/src/nfc/doc/src/nfc-android.qdoc b/src/nfc/doc/src/nfc-android.qdoc
new file mode 100644
index 00000000..e7c43423
--- /dev/null
+++ b/src/nfc/doc/src/nfc-android.qdoc
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 BasysKom GmbH
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\ingroup connectivity-nfc
+\inmodule QtNfc
+\since 5.6
+\page nfc-android.html
+\title Qt NFC on Android
+\brief Notes on Nfc for Android.
+
+\section1 Automatically launching NDEF message handlers on Android
+Android, the registration of NDEF message handlers is done via the
+\l{http://developer.android.com/guide/topics/manifest/manifest-intro.html}{Android manifest file}.
+This means the application has to provide an AndroidManifest.xml file with proper
+\l{http://developer.android.com/guide/topics/connectivity/nfc/nfc.html#manifest}{NFC intent-filter.}
+
+\code
+<intent-filter>
+ <action android:name="android.nfc.action.NDEF_DISCOVERED"/>
+ <category android:name="android.intent.category.DEFAULT"/>
+ <data android:mimeType="text/plain"/>
+</intent-filter>
+\endcode
+
+When the application is started it has to register an message handler with
+\l registerNdefMessageHandler().
+The first NDEF message arriving in the handler is the message that started the application.
+See the \l {corkboard}{CorkBoard} application for an example.
+
+\section2 Note:
+Supported tag types in Android are
+\l{http://developer.android.com/reference/android/nfc/NfcAdapter.html#ACTION_NDEF_DISCOVERED}{NDEF_DISCOVERED}
+and
+\l{http://developer.android.com/reference/android/nfc/NfcAdapter.html#ACTION_TECH_DISCOVERED}{ACTION_TAG_DISCOVERED}
+with
+\l{http://developer.android.com/reference/android/nfc/tech/TagTechnology.html}{TagTechnology}
+NdefFormatable or Ndef.
+If the application register other types in the
+\l{http://developer.android.com/guide/topics/manifest/manifest-intro.html}{Android manifest file}
+the application will be started, but the tag will never get delivered to the handler.
+The handler should be registered as early as possible. If the application has not registered a handler, the application
+will be started every time a new tag is in range and the Android device end up running multiple instances of the application.
+*/
+
diff --git a/src/nfc/doc/src/nfc-blackberry.qdoc b/src/nfc/doc/src/nfc-blackberry.qdoc
new file mode 100644
index 00000000..feebceb8
--- /dev/null
+++ b/src/nfc/doc/src/nfc-blackberry.qdoc
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\ingroup connectivity-nfc
+\inmodule QtNfc
+\since 5.6
+\page nfc-blackberry.html
+\title Qt NFC on Blackberry
+\brief Notes on Nfc for Blackberry.
+
+\section1 Automatically launching NDEF message handlers on Blackberry
+On BlackBerry the registration for NDEF message handlers is done over the
+\l{https://developer.blackberry.com/native/documentation/core/invocation_framework.html}{Invocation Framework}.
+This means that the application has to set an invoke target in the bar descriptor xml file when using
+\l registerNdefMessageHandler().
+
+\code
+<invoke-target id="com.myapp.id">
+ <type>APPLICATION</type>
+ <filter>
+ <action>bb.action.OPEN</action>
+ <mime-type>application/vnd.rim.nfc.ndef</mime-type>
+ </filter>
+</invoke-target>
+\endcode
+*/
+
diff --git a/src/nfc/qnearfieldmanager.cpp b/src/nfc/qnearfieldmanager.cpp
index 746b12a5..84f00d91 100644
--- a/src/nfc/qnearfieldmanager.cpp
+++ b/src/nfc/qnearfieldmanager.cpp
@@ -102,20 +102,10 @@ QT_BEGIN_NAMESPACE
\snippet doc_src_qtnfc.cpp handleNdefMessage
- On BlackBerry the registration for NDEF message handlers is done over the
- \l{https://developer.blackberry.com/native/documentation/core/invocation_framework.html}{Invocation Framework}.
- This means that the application has to set an invoke target in the bar descriptor xml file when using
- \l registerNdefMessageHandler().
-
- \code
- <invoke-target id="com.myapp.id">
- <type>APPLICATION</type>
- <filter>
- <action>bb.action.OPEN</action>
- <mime-type>application/vnd.rim.nfc.ndef</mime-type>
- </filter>
- </invoke-target>
- \endcode
+ Automatically launching NDEF message handlers is supported on
+ \l{nfc-blackberry.html}{Blackberry}
+ and
+ \l{nfc-android.html}{Android}.
\section3 NFC on Linux
The \l{https://01.org/linux-nfc}{Linux NFC project} provides software to support NFC on Linux platforms.