0
votes

I have been attempting to use a saved image in IsolatedStorage within the new ShareMediaTask in Windows Phone 8. I am having issues getting an image path from IsolatedStorage. I have successfully used the ShareMediaTask from the result of CameraCaptureTask as exampled in http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207027(v=vs.105).aspx but I am unsure of how to get the path from IsolatedStorage in wp8.

I was attempting to retrieved an image path using something of the following:

//Combine the directory and file name
filePath = Path.Combine(IsolatedStoragePath, fileName);
Uri uri = new Uri(@"isostore:" + filePath, UriKind.Absolute);

_shareTask = new ShareMediaTask();
//_shareTask.FilePath = @"isostore:" + filePath;
_shareTask.FilePath = uri.ToString();
_shareTask.Show();

Not sure if I'm headed in the right direction or not with this, any advice, assistance, or references would be greatly appreciated! The only similiar link I've found uses xna which I must avoid for this application http://social.msdn.microsoft.com/Forums/en-US/wpdevelop/thread/56c91aa1-26ea-41f7-b5ac-035537419faf/ .

2

2 Answers

0
votes

I think the best you can do is to save the photo do MediaLibrary, share it and the delete it immediately after sharing.

0
votes

your idea i working But after save image we are not able delete image because WP OS not give permission to delete other app item

       var mediaLibrary = new Microsoft.Xna.Framework.Media.MediaLibrary();

        var location = mediaLibrary.SavePicture(tempJpeg + ".jpg", e.Result);

        string Path = location.GetPath();


        ShareMediaTask SMT = new ShareMediaTask();

        SMT.FilePath = Path;

        SMT.Show();