-1

How to change launcher icon of android app during run time? I am getting icon from server and want to change it dynamically. In shortcut icon its working but menu icon is not changing.

2 Answers2

1

This may be a duplicate question:

Basically it should be impossible but there is a possible workaround. You can change your manifest to point at multiple drawables.

Create multiple activity-alias tags in Manifest for your MAIN launcher activity and give a different icon drawable to it. You can then choose a particular activity-alias via your code as per your requirement.

Marjorie Pickard
  • 109
  • 1
  • 2
  • 10
-1

Open your android studio as an android application go to res folder inside res folder one folder mipmap. Inside mipmap two folders are showing ic_launcher and ic_launcher_round. Replace with your desired icon of your application and rename your desired icon as ic_launcher.png. Path=Android project>res>mipmap>ic_launcher and ic_launcher_round > put/replace your desired icon in both folder after renaming abc.png to ic_launcher.png and abc.png to ic_launcher_round.png. You can find the location from manifest file from the mentioned line> android:icon="@mipmap/ic_launcher" . Press ctrl+(mouse click) you will reach to same location. Change your desired icon and enjoy.