Hi I can't find a working solution on how to get the filename when I try to implement a filepicker, the uri works and I can load the file and so on but have no clue on how to parse out the actual name of the file?
My code:
void ButtonOnClick(object sender, EventArgs eventArg)
{
Intent = new Intent();
Intent.SetAction(Intent.ActionGetContent);
Intent.SetType("audio/mpeg");
StartActivityForResult(Intent.CreateChooser(Intent, "Select Soundfile"), PickId);
}
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
if ((requestCode == PickId) && (resultCode == Result.Ok) && (data != null))
{
Uri uri = data.Data;
//var filename = data.???
System.Diagnostics.Debug.WriteLine("---Uri:"+uri);
System.Diagnostics.Debug.WriteLine("---Filename:");// + filename);
}
}