On calling, an application chooser dialog will appear and by selecting an application you can share your content with it.
For calling use this line of code in your program class:
share(context, "This is a test message", "Test Subject")
Function's definition:
public static void share (Context context, String text, String subject, String title, String dialogHeaderText) {
Intent intent = new Intent(android.content.Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
intent.putExtra(android.content.Intent.EXTRA_TEXT, text);
intent.putExtra(Intent.EXTRA_TITLE, title);
context.startActivity(Intent.createChooser(intent, dialogHeaderText));
}
See original post here: http://stackoverflow.com/a/35159850/3819836