-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] convertFileSrc does not correctly convert sdcard paths. #598
Comments
Agreed. My workaround is:
|
I haven't done the |
BTW for some reason I can not reuse a file URI unless I re-choose it again with the file picker |
Yes - I've observed the same behaviour, not exactly sure either. Must be a pointer reference that's screwed. Anyone? |
I could, but I also don't care enough to go through the effort. Ionic team should be fixing this stuff themselves, it's pretty freaking basic. But instead, they just concentrate on adding more model frameworks (Vue, React...), which just introduced even more bugs, and then they spend too much time on CSS shadow parts etc, when they could be making the core rock solid instead. |
I think they are ignoring this plugin since there is a capacitor plugin and capacitor belong to the Ionic Team. 🤔 |
I'm facing this issue right now, and @distante 's suggestion didn't work. I looked into the Ionic/WebView plugin and found that is uses an old implementation of the local web server: instead of the new one: so I believe we need to update the native webView plugin to use the newer implementation. |
I found an open issue in Ionic: Edit: |
I fixed it at last by using cordova-android@nightly (9.1.0) which contains the following temporary fix: |
I traced the issue again in native cordova plugins, and found the cause is a not authorized exception, |
After choose a file this nativePath is returned:
file:///sdcard/Music/Sinéad O'Connor/Sean Nos Jua (2002)/05 - Óró Sé Do Bheatha 'Bhaile.flac
parsing it with
convertFileSrc
returns:https://localhost/_app_file_/sdcard/Music/Sinéad O'Connor/Sean Nos Jua (2002)/05 - Óró Sé Do Bheatha 'Bhaile.flac""
which can not be loaded by the webview.
Complete file info:
Selecting the same file but from the "Music" quick access works as expected.
Also converting the uri instead of the nativePath works as expected but it fails after the app restarts.
The text was updated successfully, but these errors were encountered: