Anand DR Anand DR - 1 year ago 110
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.

Answer Source

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:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download