119Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm,
void * )
121 static bool initialized =
false;
123 return JNI_VERSION_1_6;
128 JNIEnv *nativeEnvironment;
132 UnionJNIEnvToVoid uenv;
135 if (vm->GetEnv(&uenv.venv, JNI_VERSION_1_6) != JNI_OK)
138 const auto context = QNativeInterface::QAndroidApplication::context();
139 QtJniTypes::QtMultimediaUtils::callStaticMethod<
void>(
"setContext", context);
141 if (!AndroidMediaPlayer::registerNativeMethods()
142 || !AndroidCamera::registerNativeMethods()
143 || !AndroidMediaRecorder::registerNativeMethods()
144 || !AndroidSurfaceHolder::registerNativeMethods()) {
148 AndroidSurfaceTexture::registerNativeMethods();
150 return JNI_VERSION_1_6;