Domanda

I'm trying to download one or more files from SkyDrive using the Windows Phone emulator. I'm pretty new at the Live SDK and I'm lost following these pages:

multiple file download using SkyDrive API

https://msdn.microsoft.com/en-us/library/live/hh826531.aspx#downloading_files

They both use methods and classes not provided in Live SDK 5.3 (more specifically, client.DownloadCompleted and LiveDownloadCompletedEventArgs).

È stato utile?

Soluzione

You must be using Windows Phone 8.0 SDK. DownloadCompleted and LiveDownloadCompletedEventArgs are part of the Microsoft.Live namespace on WP7.1.

In Windows Phone 8.0 DownloadAsync() is used with the await keyword. You can use it with or without progress notification.

Sample:

var result = await client.DownloadAsync(path); // path will be file id followed by '/content'
var stream = result.Stream;
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top