This tutorial runs through the basic process of creating a share button, implementing the share Intent, passing your content, and building the chooser list.
Implement a Share Intent
Step 1: Start a New Android Project
Setting up your Xamarin.Android application as a sharing target
Step 2:Create a Send Intent
Add an intent filter to the AndroidManifest.xml file like below.
path:\AndroidAppFormAsShareTarget.Android\Properties\AndroidManifest.xml
Step 3:Set the Sharing Type
Set a MIME type for the content you're shared.
This will determine which applications the chooser list presents to your users. Plain text, HTML, images and videos are among the common types to share. The following Java code demonstrates sending plain text:
sharingIntent.setType("text/plain");
This is a flexible option, as you can send plain text reliably through many different
88
Set the name attribute on the activity that will receive the callback when a user clicks the share icon.
Add code
new
Xamarin.Forms code runs on multiple platforms - each of which has its own filesystem. This means that reading and writing files is most easily done using the native file APIs on each platform. Alternatively, embedded resources are a simpler solution to distribute data files with an app.
Xamarin.Essentials plugin provides 20+ cross-platform APIs for mobile application development. Xamarin.Essentials API works with all Xamarin.Forms, Xamarin.Android, Xamarin.iOS, or UWP application that can be accessed from shared code. We are developing Xamarin with Android, iOS and UWP apps but now Xamarin.Essentials overcomes the problem, and developers can access every native platform API using C#. This plugin provides many APIs so initially, there is no need for more plugins for Xamarin. Xamarin.Essentials plugin impacts your app's minimum size.
https://docs.microsoft.com/en-us/xamarin/essentials/?context=xamarin/android
Xamarin.Essentials release notes:https://docs.microsoft.com/en-us/xamarin/essentials/release-notes/
Setting up your Xamarin.Forms application as a sharing target
Share.Plugin In Xamarin.Forms Application For Android And UWP
https://www.c-sharpcorner.com/article/share-plugin-in-xamarin-forms-application-for-android-and-uwp/