This tutorial shows you the process of implementing the share Intent. The share Intent allows users of your apps to share content across multiple channels, including email, text messaging, social networking and more. In this tutorial, I have implemented share Intent in the android grid view example.

Download Project

The share Intent looks like:

share Intent

Share Intent


Creating a share Intent
The following snippet creates a share Intent.

The following snippet creates a share Intent for plain text which can be used in mail or messaging.

The last line creates a Chooser which lets user choose their sharing medium.
share Intent for plain text

Share Intent for plain text

Share Intent for the image in the full image view of the grid view example
Replace the previous FullImage.java file with the following code.

Now on running the project, you can see a share button in the full image view, clicking which you get options to share the image.