I want to resumable a file download from the Azure server.
I've tried with many third-party libraries. ie PRDownloader, Fetch but Azure file is restart download while network issue OR any.
Referred c# code
var blobRequestOptions = new Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions
{
RetryPolicy = new Microsoft.WindowsAzure.Storage.RetryPolicies.ExponentialRetry(TimeSpan.FromSeconds(5), 3),
MaximumExecutionTime = TimeSpan.FromMinutes(60),
ServerTimeout = TimeSpan.FromMinutes(60),
StoreBlobContentMD5 = true
};
But not getting how it'll work in android. Can any one help to short it out. Help will be appreciate.
This is the BlobRequestOptions class, there is a same method setTimeoutIntervalInMs
like the ServerTimeout
property.
And about the example about setting the BlobRequestOptions
properties, you could refer to this github code: MaximumExecutionTimeTests.java , it sets the MaximumExecutionTime and TimeoutInterval.
So you could combine the example with setRetryPolicyFactory to achieve the same effect like the c# code you post.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.