I am creating Windows Phone 8.1 application, I am trying to open document using launcher, but getting exception, and document is not MS OFFICE document, it is created in other software. Here is my code.
string file = "readme.txt";
IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();
if (isf.FileExists(file))
{
isf.DeleteFile(file);
}
var filerun = await ApplicationData.Current.LocalFolder.CreateFileAsync(file);
await Launcher.LaunchFileAsync(await ApplicationData.Current.LocalFolder.GetFileAsync(file));
I am getting error like this:
"Can't be Open, File Format doesn't recognize"
and sometimes like this:
"Document has been damaged"
I do not know how to deal with this, I am stuck here, Any help would be greatly appreciated.