QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
AndroidInterface Namespace Reference

Classes

class  JniLocalRef
 

Functions

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)
 
template<typename... Args>
bool callStaticIntMethod (QJniEnvironment &env, jclass cls, jmethodID method, const char *caller, const QLoggingCategory &logCategory, jint &result, Args... args)
 
template<typename... Args>
bool callStaticBooleanMethod (QJniEnvironment &env, jclass cls, jmethodID method, const char *caller, const QLoggingCategory &logCategory, jboolean &result, Args... args)
 

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"
 

Function Documentation

◆ callStaticBooleanMethod()

template<typename... Args>
bool AndroidInterface::callStaticBooleanMethod ( QJniEnvironment &  env,
jclass  cls,
jmethodID  method,
const char *  caller,
const QLoggingCategory &  logCategory,
jboolean &  result,
Args...  args 
)
inline

◆ callStaticIntMethod()

template<typename... Args>
bool AndroidInterface::callStaticIntMethod ( QJniEnvironment &  env,
jclass  cls,
jmethodID  method,
const char *  caller,
const QLoggingCategory &  logCategory,
jint &  result,
Args...  args 
)
inline

◆ checkStoragePermissions()

bool AndroidInterface::checkStoragePermissions ( )

◆ getSDCardPath()

QString AndroidInterface::getSDCardPath ( )

◆ jniLogDebug()

static void AndroidInterface::jniLogDebug ( JNIEnv *  ,
jobject  ,
jstring  message 
)
static

Definition at line 27 of file AndroidInterface.cc.

References jniLogDebug().

Referenced by jniLogDebug(), and setNativeMethods().

◆ jniLogWarning()

static void AndroidInterface::jniLogWarning ( JNIEnv *  ,
jobject  ,
jstring  message 
)
static

Definition at line 32 of file AndroidInterface.cc.

References jniLogWarning().

Referenced by jniLogWarning(), and setNativeMethods().

◆ jniOnImportResult()

static void AndroidInterface::jniOnImportResult ( JNIEnv *  env,
jobject  ,
jstring  filePathA 
)
static

Definition at line 89 of file AndroidInterface.cc.

References jniOnImportResult(), and s_importCallback.

Referenced by jniOnImportResult(), and setNativeMethods().

◆ jniStoragePermissionsResult()

static void AndroidInterface::jniStoragePermissionsResult ( JNIEnv *  ,
jobject  ,
jboolean  granted 
)
static

◆ openFileImportDialog()

void AndroidInterface::openFileImportDialog ( const QString &  destPath,
std::function< void(const QString &)>  callback 
)

◆ setKeepScreenOn()

void AndroidInterface::setKeepScreenOn ( bool  on)

Definition at line 185 of file AndroidInterface.cc.

References s_partialWakeLock, s_wifiLock, and setKeepScreenOn().

Referenced by setKeepScreenOn().

◆ setNativeMethods()

void AndroidInterface::setNativeMethods ( )

Variable Documentation

◆ kJniQGCActivityClassName

constexpr const char* AndroidInterface::kJniQGCActivityClassName = "org/mavlink/qgroundcontrol/QGCActivity"
constexpr

◆ s_importCallback

std::function<void(const QString&)> AndroidInterface::s_importCallback
static

Definition at line 25 of file AndroidInterface.cc.

Referenced by jniOnImportResult(), and openFileImportDialog().

◆ s_partialWakeLock

QSharedPointer<QLocks::QLockBase> AndroidInterface::s_partialWakeLock
static

Definition at line 182 of file AndroidInterface.cc.

Referenced by setKeepScreenOn().

◆ s_wifiLock

QSharedPointer<QLocks::QLockBase> AndroidInterface::s_wifiLock
static

Definition at line 183 of file AndroidInterface.cc.

Referenced by setKeepScreenOn().