I'm using the Xam.Plugin.FilePicker NUGet version 1.1.0 on a Xamarin.Android.Support.v4 Fragment and when I use the file picker it works fine but when I get a file the byte array is empty and the file name is only the name of the file without the path.
If only I could get the file's full path it would be great, from there I could get the byte array. I am doing something wrong? my code is like this:
try
{
var crossFilePicker = Plugin.FilePicker.CrossFilePicker.Current;
var myResult = await crossFilePicker.PickFile();
if (!string.IsNullOrEmpty(myResult.FileName)) //Just the file name, it doesn't has the path
{
foreach (byte b in myResult.DataArray) //Empty array
b.ToString();
}
}
catch (InvalidOperationException ex)
{
ex.ToString(); //"Only one operation can be active at a time"
}
Also if you use the back button it won't let you pick andother file because "Only one operation can be active at a time"