Anand DR Anand DR - 2 months ago 9x
Android Question

build a custom Share dialog as in Marshmallow

How to get the application label from ApplicaitonInfo class in android.
I need to get application label as in default share dialog that we get in Marshmallow.


The share dialog get the labels from the ResolveInfo object LINK.

It get those objects by calling:

List<ResolveInfo> targets = packageManager.queryIntentActivities(targetIntent, 0);

in the ResolveInfo you can get the label using: