How To Add Share Action Button Intent In Android

Suppose We have a button for share the application link . So we need to add this line of code for share a link with other application .  

 

 

 

Intent sharingIntent = new Intent(Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
sharingIntent.putExtra(Intent.EXTRA_SUBJECT, "Application Name ");
sharingIntent.putExtra(Intent.EXTRA_TEXT, "https://play.google.com/store/apps/details?id=your app package name ");
startActivity(Intent.createChooser(sharingIntent, "Share via... "));














If You Like this post please rate us :
Rate Here
1 Star2 Stars3 Stars4 Stars5 Stars (15 votes, average: 4.47 out of 5)
Loading...

And Also Leave your Honest comments below



Leave a Reply

Your email address will not be published. Required fields are marked *