mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
Added simple method to set Android context in java class by C code
This commit is contained in:
parent
b7289326db
commit
80ed7e6b10
1 changed files with 6 additions and 0 deletions
|
|
@ -150,6 +150,12 @@ int dumbMethodForAllowingUsageOfMsAudioDiffFromStaticLibMediastream() {
|
|||
extern "C" void setAndroidLogHandler() {
|
||||
linphone_core_enable_logs_with_cb(linphone_android_ortp_log_handler);
|
||||
}
|
||||
|
||||
extern "C" void setMediastreamerAndroidContext(JNIEnv *env, void *context) {
|
||||
jclass ms_class = env->FindClass("org/linphone/mediastream/MediastreamerAndroidContext");
|
||||
jmethodID set_context = env->GetStaticMethodID(ms_class, "setContext", "(Ljava/lang/Object;)V");
|
||||
env->CallStaticVoidMethod(ms_class, set_context, (jobject)context);
|
||||
}
|
||||
#endif /*ANDROID*/
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue