i’m programming an android app, a Tasker, and i really don’t find the way to obtain the label of another app. This is my point, i’m using an ListActivity where you select an installed app, then when you click it creates the Intent and all the app stuff, what i wanna do is to show to the user the android:label from the app he selected, i found in ResolverInfo an attribute called .activityInfo.labelRes, and i think is the label descriptor for the R class of the app the user selected, is there anyway to obtain the string that matches to that id???
Thanks!
D.Gómez
i’m programming an android app, a Tasker, and i really don’t find the way
Share
You can use the
loadLabel(PackageManager)method ofResolveInfoto get the label of an activity. Here’s a full example which finds all the launcher activities on the device and prints them to logcat:To answer the second part of your question too, about accessing the resources of an application: They can be accessed by calling
getPackageManager().getResourcesForApplication(String), which will return aResourcesobject that you can use, though in your case, that should not be necessary.