I want to use Android Intent.ACTION_SEND for quickly sharing something. So I got a sharing list like this:

But I want to share different content for each action, such as:
-
If sharing by Email/Gmail, content should be “Share by email”.
-
If sharing by Facebook, content should be “Share by Facebook”.
So, is it possible to do that?
You can’t get such information.
Unless you create your own implementation of the dialog for the activity selection.
To create such dialog you need to use
PackageManagerand itsqueryIntentActivities()function. The function returnsList<ResolveInfo>.ResolveInfocontains some information about an activity (resolveInfo.activityInfo.packageName), and with the help ofPackageManageryou can get other information (useful for displaying the activity in the dialog) – application icon drawable, application label, … .Display the results in a list in a dialog (or in an activity styled as a dialog). When an item is clicked create new Intent.ACTION_SEND, add the content you want and add the package of the selected activity (
intent.setPackage(pkgName)).