应用程序从后台终止后是否可以继续下载文件

时间:2021-12-26 01:24:06

I want to continue download file when user terminate application from background. I'm using Heikowi/HWIFileDownload this demo. This is demo link which I'm used : https://github.com/Heikowi/HWIFileDownload In this demo work perfactly

当用户从后台终止应用程序时,我想继续下载文件。我正在使用Heikowi / HWIFileDownload这个演示。这是我使用的演示链接:https://github.com/Heikowi/HWIFileDownload在这个演示工作中

  1. Download file in background foreground.
  2. 在后台前景下载文件。
  3. Pause and resume downloading file.
  4. 暂停并继续下载文件。
  5. Resume downloding after app remove from background.
  6. 应用程序从后台删除后恢复下载。

But I want to continue the download file, if user killed application from background.

但我想继续下载文件,如果用户从后台杀死了应用程序。

应用程序从后台终止后是否可以继续下载文件

3 个解决方案

#1


4  

If the user removes app from the background, system won't wake it up to allow app to continue downloading.

如果用户从后台删除应用程序,系统将不会将其唤醒以允许应用程序继续下载。

Updated

更新

App is woken up only if it was terminated or suspended by the system. This is not the case when user does this. Apple considers that if user kills app, he doesn't want it to be running anymore.

应用程序只有在系统终止或暂停时才会被唤醒。用户执行此操作时不是这种情况。 Apple认为,如果用户杀死应用程序,他不希望它再次运行。

#2


0  

If web server supports Partial content and you implement proper business logic, then it's more than possible

如果Web服务器支持部分内容并且您实现了正确的业务逻辑,那么它就是可能的

#3


0  

The author of the HWFileDownload is already said is not possible.

已经说过HWFileDownload的作者是不可能的。

https://github.com/Heikowi/HWIFileDownload#force-quit

https://github.com/Heikowi/HWIFileDownload#force-quit

As said by other answers you need to do it by your self, if your webserver allowed to resume download then you can continue with the downloading.

正如其他答案所说,你需要自己做,如果你的网络服务器允许恢复下载,那么你可以继续下载。

#1


4  

If the user removes app from the background, system won't wake it up to allow app to continue downloading.

如果用户从后台删除应用程序,系统将不会将其唤醒以允许应用程序继续下载。

Updated

更新

App is woken up only if it was terminated or suspended by the system. This is not the case when user does this. Apple considers that if user kills app, he doesn't want it to be running anymore.

应用程序只有在系统终止或暂停时才会被唤醒。用户执行此操作时不是这种情况。 Apple认为,如果用户杀死应用程序,他不希望它再次运行。

#2


0  

If web server supports Partial content and you implement proper business logic, then it's more than possible

如果Web服务器支持部分内容并且您实现了正确的业务逻辑,那么它就是可能的

#3


0  

The author of the HWFileDownload is already said is not possible.

已经说过HWFileDownload的作者是不可能的。

https://github.com/Heikowi/HWIFileDownload#force-quit

https://github.com/Heikowi/HWIFileDownload#force-quit

As said by other answers you need to do it by your self, if your webserver allowed to resume download then you can continue with the downloading.

正如其他答案所说,你需要自己做,如果你的网络服务器允许恢复下载,那么你可以继续下载。