Is there currently any way to cancel/stop the $ionicDeploy.download() process? Our app has a fairly large amount of content and I’d like to display a progress bar along with a cancel button while the update is being downloaded to the app.
This cancel feature is required in the case where a user has a slow connection and the download takes a long time. We want to give users the option to back out in this situation.
So far I have not changed the download and extract code from what’s in the docs.
// Download the updates
$ionicDeploy.download().then(function() {
// Extract the updates
$ionicDeploy.extract().then(function() {
// Load the updated version
$ionicDeploy.load();
}, function(error) {
// Error extracting
}, function(progress) {
// Do something with the zip extraction progress
$scope.extractionProgress = progress;
console.log('Extraction Progress: ' + $scope.extractionProgress);
});
}, function(error) {
// Error downloading the updates
}, function(progress) {
// Do something with the download progress
$scope.downloadProgress = progress;
console.log('Download Progress: ' + $scope.downloadProgress);
});