-
Notifications
You must be signed in to change notification settings - Fork 711
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
Lack of cancel handling in Android, possibly memory leaks #43
Comments
Hi. Looks like a dup of #28. This is already being done. Looking forward a new version with this and more later this week. Thank you. |
Thank you for your quick response. I checked issue #28 and branch #Roadmap-1.3.0, but it looks like another issue. Main cause of this issue is, program doesn't call result.success(null) when (resultCode == Activity.RESULT_CANCELED). |
Ok. That's actually when you dismiss the picker and the event is not handled. This is already being handled on iOS but not on Android. I'll add it to the coming update too since it doesn't add too much overhead. Re-opening. |
Version 1.3.0 was deployed on dart pub and fixes this, alongside with other requested features and bug fixes. See changelog. Make sure you clean and change your pubspec to the latest version: Thank you for your feedback. |
Hello Miguel,
I'm working on an application using this excellent plugin, and I noticed that FilePicker does not callback if I close file picker in Android.
Because of this, await FilePicker.getFilePath() function call never returns, and occurs memory leaks.
https://github.com/miguelpruivo/plugins_flutter_file_picker/blob/master/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java#L50
if user closes file manager, OS calls onActivityResult() and sets resultCode to Activity.RESULT_CANCEL.
The text was updated successfully, but these errors were encountered: