I am creating a xml file within my application. I want to send this file as an attachment when the user sends mail.
Since the EmailComposeTask do not allow attachments, and I don't want to use third party api's at present, I was looking at using ShareMediaTask api.
Here is the code that invokes the shareMediaTask:
I deployed the solution on a Lumia device (not emulator) and it runs till the last message i.e "path assigned!, now opening share media" but after that instead of showing the list of mediums to share, it just returns back to the page (I only have a single test page).
void ShowShareMediaTask(string path)
MessageBox.Show("now sharing file at:" + path);
MessageBox.Show("the file exists?:" + File.Exists(path));
ShareMediaTask smt = new ShareMediaTask();
MessageBox.Show("now assigning path to sharemediatask");
smt.FilePath = path;
MessageBox.Show("path assigned!, now opening share media");
Can someone provide some insight.