-
Notifications
You must be signed in to change notification settings - Fork 517
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
Task filename and savedDir isn't updated when using saveInPublicStorage (Android) #941
Comments
@Berdsen Please open the file once the download progress is completed. You can check the status and progress like this |
Ah sorry. I forgot to mention, that the sender just sends the message when the status is completed and the progress is equal to 100. But unfortunately the file doesn't exist in the given path, because the saved filepath in the task entry remains in the application directory (../Android/data/...) but is saved correctly in the Downloads folder |
@Berdsen If you don't want to open the file. Comment this line FlutterDownloader.open(taskId: id).then((value) => {debugPrint('Open file: $value')}); |
@Berdsen Can you please add console log output by setting debug in Initialization.
|
@balajiks-dev
But in the code part, where the the task is read the follwing savedDir is retrieved from the task
|
@Berdsen See here savedDir=/storage/emulated/0/Android/data/com.example.app/files Add the file name correctly and once File downloaded. Check the local storage of the file. |
Yes. But when the saveInPublicStorage flag is set, the file doesn't exist as |
@Berdsen Got your point. But I can't reproduce it. If possible, add example project in any public repo and share me the link here please. |
@balajiks-dev |
@Berdsen Ok I will check and let you know in this week. |
Describe the bug
When downloading a file to the public downloads folder using the saveInPublicStorage= true, the task properties aren't updated.
So when the finished callback comes back and I wan't to open the file, FlutterDownloader.open(taskId) won't work.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The task should (like the notification) have the correct filename and saved dir to let FlutterDownloader.open work
In DownloadWorker.kt line 387ff. the taskDao.update isn't run with the new filename
Device information:
The text was updated successfully, but these errors were encountered: