
Here I created a new DownloadOperation object using the BackgroundDownloader class when passed the required StorageFile and the URI values that we created recently and call the CreateDownload method by passing two arguments see:īackgroundDownloader downloader = new BackgroundDownloader () ĭownloadOperation download = downloader.CreateDownload(source, destinationFile) Īwait HandleDownloadAsync(download, true ) PicturesLibrary.CreateFileAsync(ĭestination, CreationCollisionOption. String destination = () ĭestinationFile = await KnownFolders. Now, I create the source URI from which we want to download and the destination location where we want to store to see:ĩqoly4JXPV4/s1600/evil+gogle.jpg", UriKind. In this step I design the UI of the page using XAML.įirst of all add the namespaces to be used for the classes in the application they are:


Unlike the HTTP APIs, Background Transfer can be used by any language supported by the Windows Runtime. Windows Store apps provides an API for Background Transfer downloading called Background Transfer. To access this feature you must include Background Transfer ability in your application. The user can request files from the locations on the Internet. As microsoft states in their docs, its recommenced not to use the documents Library through an UWP app, instead opt for the built in storage unless its absolutely necessary.Today we will learn about the Background Transfer task in Windows Store Apps for downloading content from the Internet.
