Get Icon from another android Application

前端 未结 3 1153
日久生厌
日久生厌 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:13

    Use PackagerManager's getApplicationIcon() for this task:

    Drawable appIcon = getPackageManager().getApplicationIcon("com.google.maps");
    

提交回复
热议问题