How do I get to the Icon Launcher from another Android application on the device if I know its Package Name?
Example
String googlePackageName = "com.google.maps";
Drawable googleIcon = googlePackageName.getIconLauncher() or something.
Use PackagerManager's getApplicationIcon() for this task:
Drawable appIcon = getPackageManager().getApplicationIcon("com.google.maps");
I came across this question. Never heard of before. But I guess this should be the solution:
Drawable icon = context.getPackageManager().getApplicationIcon(packageName);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With