Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
QtNfcBroadcastReceiver.java
Go to the documentation of this file.
1
// Copyright (C) 2018 Governikus GmbH & Co. KG
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
package
org.qtproject.qt.android.nfc;
5
6
import
android.content.BroadcastReceiver;
7
import
android.content.Context;
8
import
android.content.Intent;
9
import
android.content.IntentFilter;
10
import
android.nfc.NfcAdapter;
11
12
class
QtNfcBroadcastReceiver
extends
BroadcastReceiver
13
{
14
final
private
long
qtObject;
15
final
private
Context
qtContext;
16
17
QtNfcBroadcastReceiver(
long
obj
,
Context
context)
18
{
19
qtObject =
obj
;
20
qtContext =
context
;
21
IntentFilter
filter
=
new
IntentFilter(NfcAdapter.ACTION_ADAPTER_STATE_CHANGED);
22
qtContext.registerReceiver(
this
,
filter
);
23
}
24
25
void
unregisterReceiver()
26
{
27
qtContext.unregisterReceiver(
this
);
28
}
29
30
@
Override
31
public
void
onReceive(
Context
context, Intent intent)
32
{
33
final
int
state
= intent.getIntExtra(NfcAdapter.EXTRA_ADAPTER_STATE, NfcAdapter.STATE_OFF);
34
jniOnReceive(qtObject,
state
);
35
}
36
37
native
void
jniOnReceive(
long
qtObject,
int
state
);
38
}
state
PeripheralState state
Definition
btperipheralmanager.mm:169
Context
QPainter Context
Definition
container_qpainter.cpp:30
QtMocConstants::Override
@ Override
Definition
qtmocconstants.h:43
src_gui_qopenglshaderprogram::context
QObject * context
Definition
src_gui_qopenglshaderprogram.cpp:9
filter
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition
qopengles2ext.h:893
obj
GLhandleARB obj
[0]
Definition
qopenglext.h:4164
qtconnectivity
src
android
nfc
src
org
qtproject
qt
android
nfc
QtNfcBroadcastReceiver.java
Generated on
for Qt by
1.18.0