Skip to content
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

DownloadStatus.Failed is set and removed from queue before StatusDetail is set #98

Open
2 of 6 tasks
large opened this issue Nov 4, 2018 · 1 comment
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.

Comments

@large
Copy link

large commented Nov 4, 2018

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:

  • iOS
  • Android
  • UWP
  • Other

Device:

  • Simulator
  • Real device (please specify)
@SimonSimCity
Copy link
Owner

Thanks for the change-request. I've invited you to join the team of contributors so you can do the changes on your own, because I don't have much time which I could dedicate to this project anymore.

It would be good to document the changes, done for a specific platform behavior (like the missing broadcast-call of ACTION_DOWNLOAD_COMPLETE), in a pull-request and not just put a commit on master. This will help us to have all these things documented to get back to the initial reason for implementation in case we need to.

Please let me know if you also have the environment to create a new build for all supported platforms (iOS, Android and UWP) and I'll also give you access to nuget. Please provide me your username there as well.

@SimonSimCity SimonSimCity added enhancement feedback-needed The author needs to provide feedback because it's not clear what to do or how to reproduce the bug. labels Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feedback-needed The author needs to provide feedback because it's not clear what to do or how to reproduce the bug.
Projects
None yet
Development

No branches or pull requests

2 participants