I want to create a launch icon similar to the native messaging app on Android. The icon of this application has an image, but also has a dynamically changing number (counter, which corresponds to the number of unread messages). Also, this icon is not widgets, as it is the actual icon that is present in the application box.
Can someone explain to me how I can do this? I found some solution that includes a widget with dimensions set to 1x1, but I do not want people to add shortcuts to my application as a widget. If possible, I would like to manipulate the launch icon in some programmatic way.
Thanks in advance!
Note: A question like mine was asked a long time ago. However, having seen that since then the Android API has gone through many changes, older answers may or may not be applicable - hence the need for a new question. ( link )
Lukap source share