text: Reading this article, we can learn how to share data and URI in Xamarin Forms application using Xamarin Essentials for Android and Universal Windows Platform with XAML and Visual C# in cross platform application development.
  The DataTransfer class is available at Xamarin.Essentials API. It is used within an application to share data, such as text and web links, to other applications on the device. Android, iOS, and UWP offer unique operating systems share data and URI
  Step 2
  Select the Cross-Platform template as Blank APP ->set Platform as Android and UWP and code sharing strategy as .NET standard,.
  Step 3
  For adding the reference,
  Right-click your solution (XamFormShare) the Title and sharing the Data and URI.
  Step 5
  Add the following code in the MainActivity.cs in XamFormShare.Android project.
  In onCreate() method.
  Also, add the below method.
  Step 6
  Add the following namespace and code in Mainpage.Xaml.cs.
  Note Automatically, the following code will be generated in XAML code view, while we are done in the design view.
  Step 7
  We will test Android and UWP. So, we can set multiple Startup Projects as XamFormShare.Droid and XamFormShare.UWP (universal Windows).
  Step 8
  Deploy your App in UWP and Android. The output of the XamFormShare App is shown below.
  Click the "Share Text" button for sharing a text.
  Click the shareURI button for sharing a URI.
  Summary
  Now, you have successfully shared the data and URI in Xamarin Forms application using Xamarin Essentials for Android and Universal Windows Platform using Visual C# and Xamarin.
  View All