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
6
QT_BEGIN_NAMESPACE
7
8
namespace
QtNfc
{
9
10
bool
startDiscovery
()
11
{
12
return
QJniObject::callStaticMethod<jboolean>(
13
QtJniTypes::Traits<QtJniTypes::QtNfc>::className(),
"startDiscovery"
);
14
}
15
16
bool
isEnabled
()
17
{
18
return
QJniObject::callStaticMethod<jboolean>(
19
QtJniTypes::Traits<QtJniTypes::QtNfc>::className(),
"isEnabled"
);
20
}
21
22
bool
isSupported
()
23
{
24
return
QJniObject::callStaticMethod<jboolean>(
25
QtJniTypes::Traits<QtJniTypes::QtNfc>::className(),
"isSupported"
);
26
}
27
28
bool
stopDiscovery
()
29
{
30
return
QJniObject::callStaticMethod<jboolean>(
31
QtJniTypes::Traits<QtJniTypes::QtNfc>::className(),
"stopDiscovery"
);
32
}
33
34
QJniObject
getStartIntent
()
35
{
36
return
QJniObject::callStaticMethod<QtJniTypes::Intent>(
37
QtJniTypes::Traits<QtJniTypes::QtNfc>::className(),
"getStartIntent"
);
38
}
39
40
QJniObject
getTag
(
const
QJniObject
&intent)
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
49
QT_END_NAMESPACE
50
51
Q_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
}
JNI_OnLoad
QT_END_NAMESPACE Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *)
Definition
androidjninfc.cpp:51
androidjninfc_p.h
QJniObject
\inmodule QtCore
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
QtNfc
Definition
androidjninfc.cpp:8
QtNfc::stopDiscovery
bool stopDiscovery()
Definition
androidjninfc.cpp:28
QtNfc::getStartIntent
QJniObject getStartIntent()
Definition
androidjninfc.cpp:34
QtNfc::startDiscovery
bool startDiscovery()
Definition
androidjninfc.cpp:10
QtNfc::isEnabled
bool isEnabled()
Definition
androidjninfc.cpp:16
QtNfc::getTag
QJniObject getTag(const QJniObject &intent)
Definition
androidjninfc.cpp:40
QtNfc::isSupported
bool isSupported()
Definition
androidjninfc.cpp:22
Q_DECL_EXPORT
#define Q_DECL_EXPORT
Definition
qcompilerdetection.h:1050
qtconnectivity
src
nfc
android
androidjninfc.cpp
Generated by
1.10.0