簡體   English   中英

Windows Phone 8 ShareMediaTask異常

[英]windows phone 8 ShareMediaTask exception

正在嘗試與ShareMediaTask共享圖像。

一切都正常,但到達共享應用程序后我的應用程序因應用程序意外導致的異常而崩潰

using (Stream current = await svfile.OpenStreamForWriteAsync())
        {
            var picture = lib.SavePicture("share", current);
            ShareMediaTask task = new ShareMediaTask();


            task.FilePath = picture.GetPath();

            task.Show();

            System.Diagnostics.Debug.WriteLine("yessss");
        }

在到達郵件應用程序選擇視圖后,在后台崩潰時,郵件也是如此。

//Save image to media library
//toShare is the stream source. 
//Don't use using statement to get stream

MediaLibrary library = new MediaLibrary();
var picture = library.SavePicture("Memefy_Photo", toShare);

//Open ShareMediaTask
var task = new ShareMediaTask();
task.FilePath = picture.GetPath();
task.Show();

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM