Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Launch an android intent from xamarin.forms

$
0
0

I have an intent that shows icons for sharing content in social networks. It works great but I cant implement it in xamarin.forms.
Is there a way for doing it?
The code that I cant Execue is:

        String shareBody = "Here is the share content body";
        Intent sharingIntent = new Intent(Android.Content.Intent.ActionSend);
        sharingIntent.SetType("text/plain");
        sharingIntent.PutExtra(Android.Content.Intent.ExtraText, shareBody);
        StartActivity(Intent.CreateChooser(sharingIntent, "Share using"));

I was trying to use the dependencyService but I cant convert from ContentPage to an android Activity


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>