locked
How to upload file to skydrive when app exiting? RRS feed

  • Question

  • I want to upload file to skydrive when app closing, so I use Application_Closing() or MainPage's Back(),but they are not work.

     LiveOperationResult res2 = await client.BackgroundUploadAsync(skyDriveFolderID, new Uri("/shared/transfers/SkyCodeCase1.sdf", UriKind.Relative), OverwriteOption.Overwrite);

    not works.

    UploadAsync(,,) not works.

    Is anthing error?

    Thursday, July 4, 2013 3:39 PM

All replies

  • According to the documentation this API is not supported for windows phone: http://msdn.microsoft.com/en-us/library/live/jj219362.aspx

    Also if you find another method of doing this I'd suggest against doing a cloud upload during App Closing. I believe you only have ten seconds during App Closing before the system kills your process. Maybe instead you could save the file to isolated storage, then upload it to SkyDrive the next time the app runs.

    Thursday, July 4, 2013 11:35 PM