diff options
author | Cagdas <cagdascaglak@gmail.com> | 2019-10-06 21:17:44 +0300 |
---|---|---|
committer | Cagdas <cagdascaglak@gmail.com> | 2019-10-22 22:52:13 +0300 |
commit | 008838555620261b25a4df7a814cc789ec4a4ad3 (patch) | |
tree | 364c9224a2e301039300a4c7f6fa07af609c0f48 /platform/android/java_godot_lib_jni.cpp | |
parent | 9f28803927330654cdb09f48467b481c85209ea8 (diff) |
Add request permission automatically at android
Diffstat (limited to 'platform/android/java_godot_lib_jni.cpp')
-rw-r--r-- | platform/android/java_godot_lib_jni.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/android/java_godot_lib_jni.cpp b/platform/android/java_godot_lib_jni.cpp index 7daea19961..a14e0a1960 100644 --- a/platform/android/java_godot_lib_jni.cpp +++ b/platform/android/java_godot_lib_jni.cpp @@ -1393,6 +1393,10 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_requestPermissionResu if (permission == "android.permission.RECORD_AUDIO" && p_result) { AudioDriver::get_singleton()->capture_start(); } + + if (os_android->get_main_loop()) { + os_android->get_main_loop()->emit_signal("on_request_permissions_result", permission, p_result == JNI_TRUE); + } } JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_onRendererResumed(JNIEnv *env, jclass clazz) { |