[Android] NymphCast Player cannot open local files.
MayaPosch opened this issue · 2 comments
When running NymphCast Player on Android (tested on Android 8), pressing 'Add' in the 'Player' tab brings up the native Android filepicker dialogue. After selecting a file and the dialogue closes, no file name is added to the playlist.
Looking at the result returned by the QFileDialog::getOpenFileName()
function used to bring up the filepicker dialogue, the string result is empty. This has been replicated with Qt 5.13.2 and 5.14.2, and an older Android SDK & NDK as well as the current (as of writing) SDK & NDK.
A question regarding this has been asked on the Qt forums: https://forum.qt.io/topic/113335/qfiledialog-getopenfilename-always-returns-empty-string-on-android
It's essentially the same issue as in this thread: https://forum.qt.io/topic/109548/android-qfiledialog-returns-nothing-and-code-in-background-keeps-running
Adding the 'READ_EXTERNAL_STORAGE' permission did not resolve this issue.
A bug report has been filed on the Qt bug tracker: https://bugreports.qt.io/browse/QTBUG-83372
Issue has been resolved in the Qt-based Player for Android by adding Java code and a JNI bridge to use the Java APIs for looking up local media files and translating path URIs to filesystem paths.