The following members of class QJniEnvironment are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.
(deprecated in 6.2) bool |
registerNativeMethods(const char *className, JNINativeMethod[] methods, int size) |
[deprecated in 6.2] bool QJniEnvironment::registerNativeMethods(const char *className, JNINativeMethod[] methods, int size)This function is deprecated since 6.2. We strongly advise against using it in new code.
This is an overloaded function.
Use the overload with a const JNINativeMethod[] instead.
Registers the Java methods in the array methods of size size, each of which can call native C++ functions from class className. These methods must be registered before any attempt to call them.
Returns true if the registration is successful, otherwise false.
Each element in the methods array consists of:
JNINativeMethod methods[] = {{"callNativeOne", "(I)V", reinterpret_cast<void *>(fromJavaOne)}, {"callNativeTwo", "(I)V", reinterpret_cast<void *>(fromJavaTwo)}}; QJniEnvironment env; env.registerNativeMethods("org/qtproject/android/TestJavaClass", methods, 2);
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: