-
Notifications
You must be signed in to change notification settings - Fork 699
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
Getting Audio File without extensions #487
Comments
@roquegoncalves can you try with Thank you. |
@miguelpruivo I tried in the version 2.0.11 and 2.0.10 and got the same result. |
@roquegoncalves does that happen with all audio files? |
@miguelpruivo This happens with flac, wav, m4a, mp3 and ogg files, but I didn't tried any other format. |
@roquegoncalves so the audio selection was working prior to 2.0.0 properly for you? |
@miguelpruivo Exactly, on my tests everything works fine prior version 2.0.0 |
Hi, is this still an issue? |
Hi, I tested on version 2.1.0 and still doesn't work, but I'm good using the 1.13.3 version for my project. |
Hi, you closed but this issue is not resolved. I got same error. I printed single.path, single.name and paths.first. These are logs:
Real file name is Kozmos.Com.mp3 Flutter doctor print;
|
I'm also having a similar issue but only in OnePlus device (also checked on pixel emulator & Mi Note 7s) version details: how to reproduce the error:
the output of above print:
name of file selected:
*just verifying again, when used on other devices it prints the ".mp3" also for name & path; and with the correct extension print |
Hi, I've just tried with both name examples and both seem to work properly on Pixel 2 emulator as posted in screenshot below: The method to extract the file name is generic and should cover most cases, which can be found here. Nevertheless, just updated the naming method, let me know if it fixed for you with version 2.1.3. Let me know if this is still an issue @Topup3 @vkbaloda. Thanks. |
Hi, I tried version 2.1.4, it's not resolved for me @miguelpruivo, same device, same result.
|
@Topup3 would like to help you, but as you can see, mine works properly. Could you please try with a different device so we can figure where the issue is coming from? |
Thanks for helping Miguel I tried the latest version (2.1..4) and sadly, the problem remains. adding screenshots of picker below: problem explanation: To reproduce it:
Please tell me if I can help with something✌ |
Since this is only happening with a very specific device I'm afraid that is because somehow the underlying SDK is modified from the platform OEM ROM. It won't be easy to debug or even understand what might be causing it. |
Hi @miguelpruivo , version 1.13.3 is working well but after 2.0 not working for me ( for audios for me too. ) I will check again it with emulator and another real device, I will tell you after my tests. |
@Topup3 before 2.0.0, the plugin was using a deprecated API and non reliable way to query the file content (such as name) instead of properly using the URI. Probably that was working but there were a lot of other devices that didn’t work that way and since API 30 we can’t actually use it anymore. Unfortunately there isn’t much else to do there. But let me know if you find a fix. |
FileType.audio not working |
Mostly, doesn't work on Oneplus phones.
|
@aavgeen I'm sorry as I don't have those devices. Device specific are hard to debug and most of the times make it quite impossible to fix/handle this kind of issues with ease. Feel free to issue a PR if you find what the problem is. Thank you. |
Closing due to inactivity. |
Hey guys, I am also reproducing it on a |
@HugoHeneault let me know if you come up with something and I’ll reopen right away. |
Describe the bug
I'm using latest version of Flutter 1.20.4 and Android Studio 4.1. Flutter doctor has no issues.
Latest version of FilePicker 2.0.12.
When I try to select a music file from the default android picker choosing the audio folder, I can get the file but it's coming without the extension on the file path.
Issue details
Error Log
D/FilePickerDelegate( 4922): Selected type audio/*
I/FilePickerUtils( 4922): Caching from URI: content://com.android.providers.media.documents/document/audio%3A299529
D/FilePickerUtils( 4922): File loaded and cached at:/data/user/0/com.application/cache/file_picker/(SIC)
D/FilePickerDelegate( 4922): File path:[com.mr.flutter.plugin.filepicker.FileInfo@7a6542d]
Flutter Version details
[✓] Flutter (Channel unknown, 1.20.4, on Mac OS X 10.15.7 19H2, locale en-BR)
• Flutter version 1.20.4 at /Users/roque/Documents/flutter
• Framework revision fba99f6cf9 (8 weeks ago), 2020-09-14 15:32:52 -0700
• Engine revision d1bc06f032
• Dart version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/roque/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = ${HOME}/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.0.1, Build version 12A7300
• CocoaPods version 1.9.3
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 1.20.4
• Dart plugin version 2.9.2 (stable)
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] Connected device (1 available)
• Moto Z3 Play (mobile) • 0047758004 • android-arm64 • Android 9 (API 28)
The text was updated successfully, but these errors were encountered: