Skip to content
This repository has been archived by the owner on Mar 15, 2023. It is now read-only.
/ httptransfertasks Public archive

Cross Platform HTTP Transfers for downloading and uploading (supports background operations)

License

Notifications You must be signed in to change notification settings

aritchie/httptransfertasks

Repository files navigation

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

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
    }
};

About

Cross Platform HTTP Transfers for downloading and uploading (supports background operations)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published