Hello. I'm trying to open a file I've just downloaded but nothing happens when i try opening it with PresentOpenInMenu.
Here's my code for downloading:
` using (var fileStream = await msg.Content.ReadAsStreamAsync()) { var documents = Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments); string path = Path.Combine(documents, doc.CaseId.ToString());
System.IO.Directory.CreateDirectory(path);
string filePath = System.IO.Path.Combine(path, doc.FileName);
using (var file = File.Open(filePath, FileMode.Create, FileAccess.Write))
{
MemoryStream mem = (MemoryStream)fileStream;
mem.WriteTo(file);
}
} `
And here's when i try opening the file:
var viewer = UIDocumentInteractionController.FromUrl(NSUrl.FromFilename(filePath));
viewer.PresentOpenInMenu (this.View.Frame, this.View, true);
And as i said when the code has run nothing happens.
What am i doing wrong?