Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
androidjninfc.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 Centria research and development
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "androidjninfc_p.h"
5
7
8namespace QtNfc {
9
11{
12 return QJniObject::callStaticMethod<jboolean>(
13 QtJniTypes::Traits<QtJniTypes::QtNfc>::className(), "startDiscovery");
14}
15
17{
18 return QJniObject::callStaticMethod<jboolean>(
19 QtJniTypes::Traits<QtJniTypes::QtNfc>::className(), "isEnabled");
20}
21
23{
24 return QJniObject::callStaticMethod<jboolean>(
25 QtJniTypes::Traits<QtJniTypes::QtNfc>::className(), "isSupported");
26}
27
29{
30 return QJniObject::callStaticMethod<jboolean>(
31 QtJniTypes::Traits<QtJniTypes::QtNfc>::className(), "stopDiscovery");
32}
33
35{
36 return QJniObject::callStaticMethod<QtJniTypes::Intent>(
37 QtJniTypes::Traits<QtJniTypes::QtNfc>::className(), "getStartIntent");
38}
39
41{
42 return QJniObject::callStaticMethod<QtJniTypes::Parcellable>(
43 QtJniTypes::Traits<QtJniTypes::QtNfc>::className(), "getTag",
44 intent.object<QtJniTypes::Intent>());
45}
46
47} // namespace QtNfc
48
50
51Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void * /*reserved*/)
52{
53 static bool initialized = false;
54 if (initialized)
55 return JNI_VERSION_1_6;
56 initialized = true;
57
58 JNIEnv* env;
59 if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
60 return -1;
61 }
62
63 return JNI_VERSION_1_6;
64}
QT_END_NAMESPACE Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *)
\inmodule QtCore
Combined button and popup list for selecting options.
bool stopDiscovery()
QJniObject getStartIntent()
bool startDiscovery()
bool isEnabled()
QJniObject getTag(const QJniObject &intent)
bool isSupported()
#define Q_DECL_EXPORT