Trying to show application icon in my app. Firstly, i used Application.loadIcon()
. That worked fine until an application 'lark' used AdaptiveIconDrawable
, which crashed my app. The exception said AdaptiveIconDrawable
can't be cast to BitmapDrawable
. So I changed the way to get icon bitmap which is same the method in the post:
Android Get Apps Adaptive Icons from Package Manager
But another problem apearred, the icon obtaind in this way is different with the application's real desktop icon Icon I obtained: Obtained Icon
Actual desktop Icon: Real Icon