/****************************************************************************
**
** 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 {QNearFieldManager::}{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.
*/

