- Home /
Question by
vmnoodel · Jul 23, 2014 at 10:46 AM ·
windows phone 8
Image sharing code not working for WP8 Plugin
The following code to save image and share it on social networks (whatsapp,facebook etc) works on the windows phone native app but not when used in unity windows phone 8 plugin
public void SaveToLibraryAndShare() {
MediaLibrary library = new MediaLibrary();
Stream toShare = Application.GetResourceStream(new Uri(@"wallpaper/CustomizedPersonalWalleper_11.jpg", UriKind.Relative)).Stream;
Picture picture = library.SavePicture("Memefy_Photo", toShare);
var task = new ShareMediaTask();
task.FilePath = picture.GetPath() ;
task.Show();
}
I have tried bringing the sharemediatask on the main thread using
Deployment.Current.Dispatcher.BeginInvoke(() =>
task.Show());
But this also crashes my unity app . What's the fix
Comment
Your answer
Follow this Question
Related Questions
My game doesn't show up when searching for it by name on the Windows Phone Store 0 Answers
IAP fails on Windows Store 0 Answers
Windows Store App Encryption 2 Answers
MediaElement watermark wp8 0 Answers
Windows Phone 8 tile confusion 1 Answer