You are looking for Share via Intent, something like:
Intent intent=new Intent(android.content.Intent.ACTION_SEND);
intent.setType("text/plain");
//the line below is optional
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
// Add data to the intent, the receiving app will decide what to do with it.
intent.putExtra(Intent.EXTRA_SUBJECT, “Some Subject Line”);
intent.putExtra(Intent.EXTRA_TEXT, “Body of the message”);
Also, you can use createChooser()
:
startActivity(Intent.createChooser(intent, “How do you want to share?”));
Refer:
How to filter specific apps for ACTION_SEND intent (and set a different text for each app)
http://android-developers.blogspot.in/2012/02/share-with-intents.html
Check this too:
http://developer.android.com/training/sharing/send.html