How to get the installed app icon using package name
.
.
For getting the icon only you can only write the code
Drawable appicon = null;
try {
String appicon = getPackageManager().getApplicationIcon("com.whatsapp");
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
img.setImageDrawable(appicon);
Getting a list of all the android apps installed on device is useful when you are developing an app which is helpful in sharing apk files with other via Bluetooth or by some other mechanism. Also it is useful when you are developing an app locker application. With the help of an android class ‘PackageManager’ you can easily fetch information of all the application packages currently installed on the device. Just by calling getpackagemanager() you can get an instance of package manager class. PackageManager class consists methods for querying and manipulating installed package. This tutorial describes how to get list of all android apps installed on device programmatically.
.
.
previous Window:
• How to get Package names of installed apps...
.
.
Share the video link:
• How to get the installed app icon using pa...
.
.
Subscribe my channel:
/ @androidlearners9163
.
.
Follow me on my Facebook Page:
/ android-lear. .
.
If you like my video then subscribe and give us your feedback about the channel...
.
.
.
Share your efforts with us ,We are glad to see your work...
Best of luck... :)