Android app - Adding a “share” button to share the app on social networks

I have an app, and I’d like to add a share button to it. Once the button is clicked, I’d like it to open the following window:

Then the user will choose where to share it and it will display the following default message: “Just found this great app! Find it here:

Can you please tell me how to do it?

Thanks! Will be very helpful!


There are three different ways by which you can do it.

Time for self promotion:

  1. Action bar sherlock for older android versions:
  2. Android direct action bar api for newer android versions:
  3. Invoking that dialog from a button inside app/title bar:

Corresponding text Version:
How to share data using sherlock action bar in Android | Java Experience
How to share data in Android | Java Experience
How to add share button in Android title bar | Java Experience


AND remember to wrap the intent creating in a try{} block… in case Intent.ACTION_SEND is not available. I got bitten by a similar one when trying to launch Google Play …