Thanks to this tutorial: http://mobile.tutsplus.com/tutorials/android/android-sdk-implement-a-share-intent/ I know how to simply share my message: I simply create the intent and start activity.
However, there’s a little latency between startActivity call and effective show of the share windows so I’d like to make a custom activity with, for example, a listview of suitable apps for that type of sharing.
I thus need:
edit:
1) A way to get a list of apps wich can handle the intent, in my case an ACTION.SEND intent with a text/plain mime type.
2)A way to start them with my message body and subject.
Get the list of installed application:
and to launch that package:
EDIT
This method queries the package manager for installed packages that can respond to an intent with the specified action:
and to share your text using a specific application (which can handle ACTION_SEND):