• Mobile
  • Extensions
  • Releases
  • GitHub
  • Blog
  • Sponsor
Show / Hide Table of Contents
  • Home
  • Quick Start
  • Setup
    • Dependency Injection
    • Startup
    • Static Instances
    • iOS
    • Android
  • Configuration Extensions
  • Jobs
    • Setup
    • Create a Job
    • Querying, Cancelling, and Adhoc
    • Frequently Asked Questions
  • Bluetooth LE Client
    • Setup
    • Scanning
    • Peripheral
    • Best Practices
    • Manged Scanning
    • Managed Peripheral
  • Bluetooth LE Hosting
    • Setup
    • GATT
    • Advertising
  • Geofencing
  • GPS
    • Setup
  • Motion Activity
  • Local Notifications
    • Getting Started
    • Channels
  • Push Notifications
    • Getting Started
    • Native
    • Azure Notification Hubs
    • Firebase Messaging
    • One Signal
  • Beacons
    • Ranging
    • Monitoring (Background)
  • HTTP Transfers
    • Getting Started
    • Advanced
  • Framework
    • Getting Started
    • ViewModel
  • Sensors
    • Getting Started
    • Accelerometer
    • Ambient Light
    • Barometer
    • Compass
    • Gyroscope
    • Humidity
    • Magnetometer
    • Pedometer
    • Proximity
    • Temperature

Getting Started

<?! PackageInfo "Shiny.Net.Http" /?>

As developers, we often take internet connectivity and speed for granted. Mobile phones are taking HUGE sized photos these days that can take quite some time to upload.

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

<?! PackageInfo "Shiny.Net.Http" /?>

Setup

  1. Create a delegate in your shared code
using System;
using System.Threading.Tasks;
using Shiny;
using Shiny.Net.Http;

namespace YourNamespace
{
    public class MyHttpTransferDelegate : IHttpTransferDelegate
    {

        public Task OnError(HttpTransfer transfer, Exception ex) 
        {
        }

        public async Task OnCompleted(HttpTransfer transfer)
        {
        }
    }
}
  1. Add the following to your Shiny Startup

<?! Startup ?> services.UseHttpTransfers<YourNamespace.MyHttpTransferDelegate>(); <?!/ Startup ?>

  • Improve this Doc
In This Article
Back to top Generated by DocFX