Get Icon from another android Application

前端 未结 3 1182
日久生厌
日久生厌 2021-02-08 04:49

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.go         


        
3条回答
  •  自闭症患者
    2021-02-08 05:22

    I came across this question. Never heard of before. But I guess this should be the solution:

    Drawable icon = context.getPackageManager().getApplicationIcon(packageName);
    

提交回复
热议问题