Jean
0
Q:

xamarin share text intent

public class CustomActions : ICustomActions
    {
        Context context = Android.App.Application.Context;

        public void ShareThisLink()
        {
            Intent sharingInt = new Intent(Android.Content.Intent.ActionSend);
            sharingInt.SetType("text/plain");
            string shareBody = "https://www.google.com";
            sharingInt.PutExtra(Android.Content.Intent.ExtraSubject, "Subject");
            sharingInt.PutExtra(Android.Content.Intent.ExtraText, shareBody);
            context.StartActivity(Intent.CreateChooser(sharingInt, "Share via"));
        }

    }
0

New to Communities?

Join the community