title: Get Original file name in file sharing Xamarin.forms
body: <p>I'm trying to implement the file sharing from other apps in Xamarin.Forms.
  And I have some issues with Android implementation.</p>
  
  <p>I'm referring to code of <a href="https://codemilltech.com/sending-files-to-a-xamarin-forms-app-part-2-android/" rel="nofollow noreferrer">https://codemilltech.com/sending-files-to-a-xamarin-forms-app-part-2-android/</a>.</p>
  
  <pre><code>if (Intent.Action == Intent.ActionSend)
              {
  
              var uriFromExtras = Intent.GetParcelableExtra(Intent.ExtraStream) as Android.Net.Uri;
              string path = Intent.GetParcelableExtra(Intent.ExtraStream).ToString();
              var subject = Intent.GetStringExtra(Intent.ExtraSubject);
  
              // Get the info from ClipData 
              var pdf = Intent.ClipData.GetItemAt(0);
  
              // Open a stream from the URI 
              var pdfStream = ContentResolver.OpenInputStream(pdf.Uri);
  
              // Save it over 
              var memOfPdf = new System.IO.MemoryStream();
              pdfStream.CopyTo(memOfPdf);
              var docsPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
              var filePath = System.IO.Path.Combine(docsPath, "temp");
              System.IO.File.WriteAllBytes(filePath, memOfPdf.ToArray());
              mainForms.ShareFile(memOfPdf.ToArray(), System.IO.Path.GetFileName(path));
          }
  </code></pre>
  
  <p>And I need to get the original name of shared file from File Manager.
  Can anyone help me?</p>