At Instagrams anniversary the users were possible to change the app icon. Even though this feature isn't available anymore Todoist has a similar working implementation of this feature.
I researched how to achieve this and got the second answer running: change application icon.
But this solution seems to come with drawbacks which I don't want. Some of these are listed here under the notes: blog change app icon. Furthermore, by using this solution my App gets killed every time I choose another icon with the activity-alias and I wasn't able to keep the app alive.
The behaviour of the Todoist App: First you have to activate the "change app icon dynamically"-feature which closes the app. Then after starting the app again the feature is available and you can change the app icon as you want.
As far as I know Instagrams implementation didn't even need this little restart, but I would be okay with that because this solution would be better than the one existing right now.
So how does the Todoist or Instagram approach work and how would an implementation look like?