Is it possible to change the android application icon at run time? I've read through Changing the application icon text dynamically in Android and How can i change an application icon programmatically in Android?. All answered can't. I use Android 1.6. Is there any way?
Asked
Active
Viewed 1.4k times
5
-
1The Chainfire (makers of SuperSU) team recently had a [blog post](http://www.chainfire.eu/articles/133/_TUT_Supporting_multiple_icons_in_your_app/) that goes into detail on how they change the application's icon using [activity-alias](http://developer.android.com/guide/topics/manifest/activity-alias-element.html) and [PackageManager.setComponentEnabledSetting()](http://developer.android.com/reference/android/content/pm/PackageManager.html#setComponentEnabledSetting%28android.content.ComponentName,%20int,%20int%29) – ianhanniballake Feb 24 '13 at 02:28
-
@ianhanniballake Have you successfully implemented that solution from Chainfire? If so, what did you do (if anything) about the fact that the icon used at the OS level (such as for multi-tasking, the uninstall popup, or in the Application Manager listing) remains the original or becomes the default generic Android icon if you haven't set one at the application level in the manifest? I've found that the Chainfire solution only works for the launcher in the app drawer or homescreen shortcut and then mismatches with the OS level version. – jokeefe Oct 03 '14 at 01:32
-
1Does this answer your question? [How to change an application icon programmatically in Android?](https://stackoverflow.com/questions/1103027/how-to-change-an-application-icon-programmatically-in-android) – Josh Correia Jul 21 '20 at 06:14
1 Answers
6
Two possible answers:
1) You can't. As CommonsWare said in that post:
You cannot change the manifest or the resource in the signed-and-sealed APK, except through a software upgrade.
2) Use the widget approach as mentioned here.