【发布时间】:2014-01-30 07:01:18
【问题描述】:
我正在开发Windows Phone 8 应用程序,它从电话 收集联系人并将其存储在xml 文件中。我想在background 中将upload 发送给skydrive。我试过这个
IsolatedStorageFileStream fileStream = null;
using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication())
{
fileStream = store.OpenFile("XMLFile1.xml", FileMode.Open, FileAccess.Read);
var res = await client.UploadAsync("me/skydrive", "XMLFile1.xml", fileStream, OverwriteOption.Overwrite);
fileStream.Close();
}
此代码完美运行。但是当我按主页键上传停止。那么即使用户按screen lock key 或home key,我如何在后台将文件上传到skydrive?并且还想知道如何我可以将文件上传到跳伞中的特定文件夹?文件夹,如文档或图片。如何使用client.BackgroundUploadAsync?如何传递fileStream 对象?
【问题讨论】:
标签: c# windows-phone-8 isolatedstorage onedrive