QAndroidJniEnvironment Class

The QAndroidJniEnvironment provides access to the JNI Environment. More...

Header: #include <QAndroidJniEnvironment>
qmake: QT += androidextras
Since: Qt 5.2

Public Functions

Static Public Members

JavaVM *javaVM()

Detailed Description

The QAndroidJniEnvironment provides access to the JNI Environment.

Member Function Documentation


Constructs a new QAndroidJniEnvironment object and attach the current thread to the Java VM.

bool exceptionCheck()
      The QAndroidJniEnvironment attaches the current thread to the JavaVM on
      creation and detach when it goes out of scope.
    QAndroidJniEnvironment qjniEnv;
    return qjniEnv->ExceptionCheck();


Detaches the current thread from the Java VM and destroys the QAndroidJniEnvironment object.

[static] JavaVM *QAndroidJniEnvironment::javaVM()

Returns the Java VM interface.

QAndroidJniEnvironment::operator JNIEnv *() const

Returns the JNI Environment pointer.

JNIEnv *QAndroidJniEnvironment::operator->()

Provides access to the QAndroidJniEnvironment's JNIEnv pointer.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.