I want to retrieve the icon of an app. If I use
String pkg = "com.app.my";
Drawable icon = getContext().getPackageManager().getApplicationIcon(pkg);
The result is a Drawable. how can I retrieve the id of the associated resource for passing it as extra in an intent? THanks!
The following snippet should do the trick.