diff android/dw.cpp @ 2715:e9ad53d2271b

Android: Fix Intent based file chooser and switch to using it by default. The old dialog based file chooser is still included as a fallback for now. Only run the color chooser if called on the main thread, this should not be a problem since almost nothing except expose callbacks run on the main thread. The intent based file chooser can't choose directories, so for now operate like normal, but return the path to the chosen file instead of the file itself.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 05 Dec 2021 15:08:13 +0000
parents 26bb1e4a97d0
children 6754e8f70142
line wrap: on
line diff
--- a/android/dw.cpp	Fri Dec 03 20:21:13 2021 +0000
+++ b/android/dw.cpp	Sun Dec 05 15:08:13 2021 +0000
@@ -1207,7 +1207,7 @@
         // First get the class that contains the method you need to call
         jclass clazz = _dw_find_class(env, DW_CLASS_NAME);
         // Get the method that you want to call
-        jmethodID fileBrowse = env->GetMethodID(clazz, "fileBrowse",
+        jmethodID fileBrowse = env->GetMethodID(clazz, "fileBrowseNew",
                                                 "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;");
         // Call the method on the object
         jstring jresult = (jstring)_dw_jni_check_result(env, env->CallObjectMethod(_dw_obj, fileBrowse, jstr, path, jext, flags), _DW_REFERENCE_NONE);