Skip to content
master
Switch branches/tags
Code

UPDATE - This library has now moved to the Shiny Framework at https://github.com/shinyorg/shiny

ACR HTTP Transfers Plugin for Xamarin and Windows

Cross platform HTTP download/upload manager

SUPPORT THIS PROJECT

Change Log

NuGet Build status

SUPPORTED PLATFORMS

Platform Version
iOS 7+
Android 4.3+
Windows UWP 16299+
.NET Standard 2.0

FEATURES

  • Background Uploads & Downloads on each platform
  • Supports transfer filtering based on metered connections (iOS & UWP only at the moment)
  • Event Based Metrics
    • Percentage Complete
    • Total Bytes Expected
    • Total Bytes Transferred
    • Transfer Speed (Bytes Per Second)
    • Estimated Completion Time

SETUP

Be sure to install the Plugin.HttpTransferTasks nuget package in all of your main platform projects as well as your core/PCL project

NuGet

Android

Add the following to your AndroidManifest.xml

<uses-permission android:name="android.permission.WAKE_LOCK"/>

HOW TO USE BASICS

// discover some devices
var task = CrossHttpTransfers.Current.Upload("http://somewheretosend.com", "<YOUR LOCAL FILEPATH>");


// when performing downloads, it is necessary to listen to where the temp file lands (this is due to iOS)
var task = CrossHttpTransfers.Current.Download("http://somewheretosend.com");
task.PropertyChanged += (sender, args) => 
{
    if (task.Status != nameof(IHttpStatus.Task))
        return;

    if (task.Status == TaskStatus.Completed)
    {
        task.LocalFilePath // move this file appropriately here
    }
};