Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
androidbroadcastreceiver_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 Lauri Laanmets (Proekspert AS) <lauri.laanmets@eesti.ee>
2// Copyright (C) 2021 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef JNIBROADCASTRECEIVER_H
6#define JNIBROADCASTRECEIVER_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <jni.h>
20#include <QtCore/QObject>
21#include <QtCore/private/qglobal_p.h>
22#include <android/log.h>
23#include <android/jni_android_p.h>
24#include <QtCore/QJniObject>
25
27
30
32{
34public:
36 virtual ~AndroidBroadcastReceiver();
37
38 void addAction(const QJniObject &filter);
39 bool isValid() const;
40 void unregisterReceiver();
41
42protected:
45 virtual void onReceive(JNIEnv *env, jobject context, jobject intent) = 0;
48 virtual void onReceiveLeScan(JNIEnv *env, jobject jBluetoothDevice, jint rssi, jbyteArray scanRecord) = 0;
49
50
54 bool valid;
55};
56
57QT_END_NAMESPACE
58#endif // JNIBROADCASTRECEIVER_H
QT_BEGIN_NAMESPACE void QtBroadcastReceiver_jniOnReceive(JNIEnv *, jobject, jlong, QtJniTypes::Context, QtJniTypes::Intent)
friend void QtBluetoothLE_leScanResult(JNIEnv *, jobject, jlong, QtJniTypes::BluetoothDevice, jint, jbyteArray)
virtual void onReceive(JNIEnv *env, jobject context, jobject intent)=0
virtual void onReceiveLeScan(JNIEnv *env, jobject jBluetoothDevice, jint rssi, jbyteArray scanRecord)=0
void addAction(const QJniObject &filter)
QString valueForStaticField()
JavaNames
@ ExtraDevice
@ ExtraUuid
@ ExtraBondState
@ ExtraRssi
@ ActionScanModeChanged
@ ExtraPairingKey
@ ActionFound
@ ActionDiscoveryStarted
@ ActionAclDisconnected
@ ActionBondStateChanged
@ ActionUuid
@ BluetoothAdapter
@ ExtraPairingVariant
@ ExtraScanMode
@ BluetoothDevice
@ ActionAclConnected
@ ActionDiscoveryFinished
QString valueFromStaticFieldCache(const char *key, const char *className, const char *fieldName)
\inmodule QtBluetooth
Definition qbluetooth.h:14
quint16 QLowEnergyHandle
Definition qbluetooth.h:42