i84
i84

Reputation: 53

BackgroundDownloader - How to resume download process after reboot

I'm using BackgroundDownloader to download a file from UWP sample app.

Download process persist in the background even I close the app and the download process is automatically continued after switch off and switch on network connection. That's great.

But if I reboot the machine during download process, download operation isn't continued after the reboot but exists with PausedNoNetwork state. Download is resumed when I start UWP app again.

Is it possible to resume download process automatically after the reboot?

Upvotes: 0

Views: 312

Answers (1)

Nico Zhu
Nico Zhu

Reputation: 32775

Is it possible to resume download process automatically after the reboot?

BackgroundDownloader is system level, It will be managed by system after registered. After app termination, an app should enumerate all existing DownloadOperation instances at next start-up using GetCurrentDownloadsAsync. When a UWP app using Background Transfer is terminated, incomplete downloads will persist in the background. If the app is restarted after termination and operations from the previous session are not enumerated and re-attached to the current session, they will remain incomplete and continue to occupy resources. If you reboot the system however the associated app does not startup, BackgroundDownloader will paused. I think you could set startup task extension for your app. For more please refer this case reply.

Upvotes: 1

Related Questions