How to get icons of Installed Applications in Android

I wanted to get icons of running activities And here I done it.

List<PackageInfo> packs = getPackageManager().getInstalledPackages(0);
Drawable[] icons=new Drawable[packs.size];
for(int i=0;i<packs.size();i++) {
    PackageInfo p = packs.get(i);
    icons[i]= p.applicationInfo.loadIcon(getPackageManager());
And you may need to convert the return values to Bitmap.


Popular posts from this blog

Fatal: LoadModule: error loading module 'mod_sql_mysql.c'

How to hide Android Soft Keyboard