cordova-plugin-background-download
cordova-plugin-background-download copied to clipboard
Identify Download Error Reason
Is there any means by which I could check a download failure reason? For example, Apache Cordova's official FileTransfer plugin has a FileTransferError which says us if the error was because of a network connection failure or because the file was not found.
I need this information because sometimes the network info plugin is giving wrong information about the network status. Specifically, it says the current network type is "wi-fi" for a short period after the device has been disconnected. That is, it looks like to be a delay before the network info plugin to change from "wi-fi" to "none" after the device has been disconnected.
Agreed, I can always set a timeout in javascript before I check the network status, but I just don't feel this would be the most appropriate solution for this issue, and I think an "download failure reason" info would be very great.
which version of cordova are you using? This plugin doesn't seem to have much support :(
@gkimpson I don't know which Cordova version my project is using.
I've decided to install this plugin in my project because Apache Cordova's official FileTransfer plugin didn't work on iOS, but I couldn't use neither one alone, so I had to use both plugins so that Apache Cordova's official FileTransfer plugin is used when the app runs on android and cordova-plugin-background-download when the app runs on iOS.