Unsolved how to call java method, to get file from content:/...
-
Hi
I need to get filePath from android content:/...
I need this for MediaPlayer sourceVideo.
It looks like all the heavy duty work is done in Ekke example https://github.com/ekke/ekkesSHAREexample/blob/master/android/src/org/ekkescorner/utils/QSharePathResolver.java
But I have trouble calling this method, java class is in: android/src/org/ekkescorner/utilsQAndroidJniObject jUri(url.toString().toLocal8Bit()); jstring filename =QAndroidJniObject::callStaticMethod<jstring>("org/ekkescorner/utils/QSharePathResolver", "getRealPathFromURI", "(Landroid/content/Context;Landroid/net/Uri;I)Ljava/lang/String;", QtAndroid::androidContext().object(),jUri.object());
ld: error: undefined symbol: _jstring* QAndroidJniObject::callStaticMethod<_jstring*>(char const*, char const*, char const*, ...)
Best Regards
Marek -
I have found different solution and it is working
https://stackoverflow.com/questions/34006608/qt-and-android-get-path-from-image-in-galleryBest,
Marek