DownloadStatus.Failed is set and removed from queue before StatusDetail is set #98
Open
2 of 6 tasks
Labels
enhancement
feedback-needed
The author needs to provide feedback because it's not clear what to do or how to reproduce the bug.
Steps to reproduce
Download a file that generate status DownloadStatus.Failed
Try downloading a file that is bigger than the space you have available.
Expected behavior
When download have status DownloadStatus.Failed the StatusDetails needs to be set before item is removed from queue.
In file: Xamarin-CrossDownloadManager/DownloadManager/Plugin.DownloadManager.Android/DownloadManagerImplementation.cs
Move the two lines:
175 downloadFile.Status = DownloadFileStatus.FAILED;
176 RemoveFile (downloadFile);
To line 214, that ensure that StatusDetail is set before Status making more sense (equal to DownloadStatus.Successful)
Actual behavior
DownloadStatus.StatusDetail is set after the item is removed from queue, making it unavailable to read.
Extra info regarding INSUFFICIENT_SPACE_ERROR
The ACTION_DOWNLOAD_COMPLETE broadcast is not called after a INSUFFICIENT_SPACE_ERROR , but this issue is not related to CrossDownloadmanager.
I've added a bug with Google, since it should be handled by notify the user that a download was finished: https://issuetracker.google.com/issues/118860049
Configuration
Platform:
Device:
The text was updated successfully, but these errors were encountered: