How can I read icon from apk file (not installed) ? I need it in my file 
manager to show on ListView.

I found: 

if (file.getPath().endsWith(".apk")) {
    PackageInfo pi = 
context.getPackageManager().getPackageArchiveInfo(file.getAbsolutePath(), 
0);
    Drawable icon = 
pi.applicationInfo.loadIcon(context.getPackageManager());
    .... use Drawable....
}

but this code return default icon for apk - "green android on white 
background" not icon which represent installed apk.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to