-
Notifications
You must be signed in to change notification settings - Fork 18
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
Download restarts from 0 after app close and open #24
Comments
Hi. Maybe you missed something simple. After downloading the new version, "pod install".
Example application control;You may want to check how things are done in the "example" application. 1- |
@HyopeR , thank you so much for your reply, but i think i can see the same issue on the iOS screen recording you shared right before you close the example application i can see the download is like a quarter done on the progress bar but when you re-open it it starts from 0, am i missing something? thanks |
I think I understand. |
Ow okay so even tho the progress on |
Yes, I'm pretty sure it is. |
Okay, i was pretty sure they were starting from scratch when testing yesterday before submitting the Issue, but i was literally trying to record a video to send to you here to show the problem and closed the app the downloads actually resumed as expected 🙂 |
@surafelbm try not to call 'begin' method when you re-attach the task(set begin to false) |
Great explication folks So should we close that issue ? |
Is this a bug report, a feature request, or a question?
Bug report
Have you followed the required steps before opening a bug report?
(Check the step you've followed - put an
x
character between the square brackets ([]
).)Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
i am only testing on iOS
(Write your answer here and specify the iOS/Android versions on which you've been able to reproduce the issue.)
i am using iOS 17.0 on iPhone 15 Pro Max Simulator (also tried on device same issue)
Is the bug related to the native implementation? (NSURLSession on iOS and Fetch on Android)
(Write your answer here.)
no i haven't
Environment
(Write your answer here.)
"react-native": "0.70.6",
"react": "18.1.0",
"@kesha-antonov/react-native-background-downloader": "kesha-antonov/react-native-background-downloader",
currently downloading the package from github directly was having the same issues as this issue and saw that a fix was merged so i switch to the github version
i can confirm the issue also happens on the npm official version
Expected Behavior
(Write what you thought would happen.)
start download half way through the download i close the app clear it from recent apps and when i re-open i expect the download to not start from scratch
Actual Behavior
(Write what happened. Add logs!)
I start a download wait until it get to about 30% and i close the app and remove from recent apps, after a few minutes i open back the app the download starts back from 0% and downloads from scratch
i am calling
await RNBackgroundDownloader.checkForExistingDownloads()
on initial stage on App.ts and i get a list of downloads i started(in this case i started 2 downloads) two of them are returned from the function and the download starts automatically but starts from scratch i also tried callingawait RNBackgroundDownloader.ensureDownloadsAreRunning()
also tried only triggering one download and same issueSteps to Reproduce
(Write your steps so that anyone can reproduce the issue in the Snack demo you provided.)
1.when download button is called i am starting two downloads at the same time with the
download
function2.after download start i close the app
3.i have
RNBackgroundDownloader.checkForExistingDownloads()
in App.js which recognizes there is a download happening4. but the download starts from 0
The text was updated successfully, but these errors were encountered: