Closed Hackmodford closed 5 years ago
Hi @Hackmodford are you able to reproduce this on the demo? If you can do that it will be much easier for us to help you. Also, what version of the download-manager
are you working? Which versions of android have you seen this on?
I updated to 2.3.0, but it didn't seem to make a difference. I will see if I can get the demo app to do it.
I was unable to get the demo app to do it.
However, I was able to find a way to stop my code from trying to reprocess the downloaded file. It's very strange...
I have ensured that my download manager is only created once. The call to download the file only happens once. I only add a DownloadBatchCallback once.
But the download complete gets called multiple times for this particular download in my app and not the demo app.
D/BUGLOG: CREATED DOWNLOAD SERVICE
D/BUGLOG: CHECKING IF SAFE TO DELETE DOWNLOAD DIRECTORY.
D/BUGLOG: DELETING DOWNLOAD DIRECTORY
<Above only happens when app launches.>
<Below is after pressing the download button>
D/BUGLOG: Download Complete LiteDownloadBatchTitle{title='PDF Scripts'}
D/BUGLOG: Download Complete LiteDownloadBatchTitle{title='PDF Scripts'} <- Second Call!
D/BUGLOG: Bonus complete
D/BUGLOG: PROCESSING COMPLETED FOR PDF Scripts <- At this point the downloaded file is deleted, so if the app tried processing again it would fail.
D/BUGLOG: ALREADY DOWNLOADED! IGNORING PROCESSING <- The app tries processing again, but sees that this content is already downloaded...
If you can think of anything else I could try let me know. In the meantime, I think this will get me by.
Unfortunately if it can't be reproduced in the demo app it will be very difficult for us to help you. I will say that the Download-Manager
is designed to be single instance so if you are creating multiples I would fix this as a first priority.
If it's ok with you I am going to close this issue. If you are able to reproduce with the demo in any way then feel free to reopen it 😄
I have a particular file that is giving me trouble. When the download completes I get 32 calls in the DownloadBatchStatusCallback that this file has completed downloading. This is causing issues with the processing that I perform on the file afterwards. It seems to have something to do with the specific zip file my app is downloading as other (larger) files seem to be working fine.
Any idea why this might be happening?
I have attached my log below, but if there's something more specific that could help I can provide it.
"ENQUEING WORK" is printed when the DownloadBatchStatus is DOWNLOADED