I know that same kind of question has been asked for activity icon, but my question is little bit different.
I just wanted to know whether we can set the application icon programmatically, I am not asking to change, I am just asking for setting it. I hope I am clear.
<application android:icon="drawable resource"> </application>
In the above example I am setting it in manifest file, but instead of manifest can I set it through java code.
In this article, we are going to learn how to change the App Icon of an App on the Button Click. This feature can be used when we have an app for different types of users. Then as per the user type, we can change the App Icon Dynamically.
Just select the icon pack and App Cloner will find the correct icon (provided the icon pack contains an icon for the app in question). Also, in the App Cloner settings you can set a default/preferred icon pack. Then all cloning will try to use the app icon from the selected icon pack by default.
As you can read here http://developer.android.com/guide/topics/manifest/manifest-intro.html the default's app icon is set in the manifest. As manifest is located in the app's /root it cannot be modified, so there's no way to do it. You may consider that if you could change it while the app is running, changes wouldn't be saved in the manifest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With