Classes | |
| class | JniLocalRef |
Enumerations | |
| enum class | BackgroundWork { VehicleLink = 1 << 0 , VideoRecording = 1 << 1 } |
| What should go on while the app is in the background, where Android freezes an app and cuts its network. More... | |
Functions | |
| static const QLoggingCategory & | javaLogCategory (const QString &message) |
| static void | jniLogDebug (JNIEnv *, jobject, jstring message) |
| static void | jniLogWarning (JNIEnv *, jobject, jstring message) |
| static void | jniStoragePermissionsResult (JNIEnv *, jobject, jboolean granted) |
| static void | jniOnImportResult (JNIEnv *env, jobject, jstring filePathA) |
| void | setNativeMethods () |
| bool | checkStoragePermissions () |
| QString | getSDCardPath () |
| void | openFileImportDialog (const QString &destPath, std::function< void(const QString &)> callback) |
| void | setKeepScreenOn (bool on) |
| void | setBackgroundWork (BackgroundWork work, bool active) |
Variables | |
| static std::function< void(const QString &)> | s_importCallback |
| static QSharedPointer< QLocks::QLockBase > | s_partialWakeLock |
| static QSharedPointer< QLocks::QLockBase > | s_wifiLock |
| constexpr const char * | kJniQGCActivityClassName = "org/mavlink/qgroundcontrol/QGCActivity" |
|
strong |
What should go on while the app is in the background, where Android freezes an app and cuts its network.
| Enumerator | |
|---|---|
| VehicleLink | |
| VideoRecording | |
Definition at line 15 of file AndroidInterface.h.
| bool AndroidInterface::checkStoragePermissions | ( | ) |
Definition at line 151 of file AndroidInterface.cc.
References checkStoragePermissions(), and kJniQGCActivityClassName.
Referenced by checkStoragePermissions(), and getSDCardPath().
| QString AndroidInterface::getSDCardPath | ( | ) |
Definition at line 170 of file AndroidInterface.cc.
References checkStoragePermissions(), getSDCardPath(), and kJniQGCActivityClassName.
Referenced by DECLARE_SETTINGGROUP(), getSDCardPath(), and jniStoragePermissionsResult().
|
static |
The category of a message from Java, which starts with the tag that Java logged it under. The classes of the USB serial ports have tags that start alike.
Definition at line 32 of file AndroidInterface.cc.
References javaLogCategory().
Referenced by javaLogCategory(), jniLogDebug(), and jniLogWarning().
|
static |
Definition at line 37 of file AndroidInterface.cc.
References javaLogCategory(), and jniLogDebug().
Referenced by jniLogDebug(), and setNativeMethods().
|
static |
Definition at line 43 of file AndroidInterface.cc.
References javaLogCategory(), and jniLogWarning().
Referenced by jniLogWarning(), and setNativeMethods().
|
static |
Definition at line 120 of file AndroidInterface.cc.
References jniOnImportResult(), and s_importCallback.
Referenced by jniOnImportResult(), and setNativeMethods().
|
static |
Definition at line 49 of file AndroidInterface.cc.
References SettingsManager::appSettings(), getSDCardPath(), SettingsManager::instance(), jniStoragePermissionsResult(), qgcApp, Fact::rawValue(), and Fact::setRawValue().
Referenced by jniStoragePermissionsResult(), and setNativeMethods().
| void AndroidInterface::openFileImportDialog | ( | const QString & | destPath, |
| std::function< void(const QString &)> | callback ) |
Definition at line 192 of file AndroidInterface.cc.
References kJniQGCActivityClassName, openFileImportDialog(), and s_importCallback.
Referenced by QGCFileDialogController::importFromNativePicker(), and openFileImportDialog().
| void AndroidInterface::setBackgroundWork | ( | BackgroundWork | work, |
| bool | active ) |
While any work is active, a foreground service with its notification keeps the app's process and network alive in the background, and the CPU and Wi-Fi awake with the screen off. Qt still pauses the main thread there: what other threads do goes on, as a video recording does.
Definition at line 232 of file AndroidInterface.cc.
References kJniQGCActivityClassName, and setBackgroundWork().
Referenced by setBackgroundWork().
| void AndroidInterface::setKeepScreenOn | ( | bool | on | ) |
Definition at line 216 of file AndroidInterface.cc.
References s_partialWakeLock, s_wifiLock, and setKeepScreenOn().
Referenced by setKeepScreenOn().
| void AndroidInterface::setNativeMethods | ( | ) |
Definition at line 133 of file AndroidInterface.cc.
References jniLogDebug(), jniLogWarning(), jniOnImportResult(), jniStoragePermissionsResult(), kJniQGCActivityClassName, and setNativeMethods().
Referenced by JNI_OnLoad(), and setNativeMethods().
|
constexpr |
Definition at line 27 of file AndroidInterface.h.
Referenced by checkStoragePermissions(), getSDCardPath(), jniSetNativeMethods(), openFileImportDialog(), setBackgroundWork(), and setNativeMethods().
|
static |
Definition at line 28 of file AndroidInterface.cc.
Referenced by jniOnImportResult(), and openFileImportDialog().
|
static |
Definition at line 213 of file AndroidInterface.cc.
Referenced by setKeepScreenOn().
|
static |
Definition at line 214 of file AndroidInterface.cc.
Referenced by setKeepScreenOn().