Call Native Functions
ΠΡΠ·ΠΎΠ² Π½Π°ΡΠΈΠ²Π½ΡΡ
ΡΡΠ½ΠΊΡΠΈΠΉ
From C++
@JvmStatic
fun getSSLCertificatesFile(context: Context): String? {...}QAndroidJniObject certificate_path = QAndroidJniObject::callStaticObjectMethod(
"SSLCertificateProvider",
"getSSLCertificatesFile",
"(Landroid/content/Context;)Ljava/lang/String;",
androidContext.object()
);From Kotlin
extern "C" JNIEXPORT jstring JNICALL Java_ru_example_curl_MainActivity_stringFromJNI(JNIEnv * env, jobject)
{
const auto s = to_utf16(get_string());
return env->NewString(reinterpret_cast<const jchar *>(s.c_str()), s.length());
}Last updated