If you can read code,
Here's an example function that changes icon,
"This is only an example and has not been tested".
private void setIcon(int res_drawable)
{
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N_MR1) {
Intent shortcutIntent = new Intent(getApplicationContext(), MainActivity.class);
shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
shortcutIntent.setAction(Intent.ACTION_MAIN);
ShortcutInfoCompat shortcut = new ShortcutInfoCompat.Builder(getContext(), "shortcut")
.setShortLabel(getResources().getString(R.string.app_name))
.setIcon(IconCompat.createWithResource(getApplicationContext(), res_drawable))
.setIntent(shortcutIntent)
.build();
ShortcutManagerCompat.requestPinShortcut(getApplicationContext(), shortcut, null);
}
else {
Intent i= new Intent(Intent.ACTION_MAIN);
i.addCategory(Intent.CATEGORY_LAUNCHER);
Intent intent = new Intent();
intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, i);
intent.putExtra(Intent.EXTRA_SHORTCUT_NAME,
context.getResources().getString(R.string.app_name));
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,
Intent.ShortcutIconResource.fromContext(context, res_drawable));
intent.setAction(Intent.ACTION_CREATE_SHORTCUT);
context.sendBroadcast(intent);
}
}
If you look at the code, it seems that a Shortcut Icon is created on start-up.
I can't find a better way, other than setting it via a shortcut or by using Activity Aliases.
Another way is to manually edit the icon on Google Play, but I'm not sure if that takes effect on the installation or only on the PlayStore.
It seems that most companies use an update each season - The Christmas edition, the Easter edition etc...