0

As I search throughout Google. I'm finding result between 2013 and 2014 answers which giving me a negative thought. They say that badge counter can only be achieve by using launchers (e.g. Nova launcher) or any other 3rd party app.

It's already 2017 and badge counter is already common in android like in application icon for messenger, Gmail, in my own messenger for messages and even FB notifications (inside application). Is there any easy way to include it in our app development through code?

AskNilesh
  • 67,701
  • 16
  • 123
  • 163
jace
  • 1,634
  • 3
  • 14
  • 41
  • yes , its pretty straight forward . This is how i am implementing it i created a custom drawable circle with xml with the desired color , set it as a background to a textview , now when ever you get a message or something just update the counter like counter++ and set it to the textview. Does this make sense ? – Kaustubh Bhagwat Sep 06 '17 at 10:26
  • yeah it can be if it's inside the application as we can manipulate the designs inside. But how will it work with application icons itself? As far as I know, application icons are fixed, right? – jace Sep 06 '17 at 10:28
  • I'm thinking that maybe android already included it right away since it's already a common thing. Not sure that's why I ask :) – jace Sep 06 '17 at 10:30
  • we need to create a custom icon like a custom drawable that i mentioned , you cannot set text to application icons – Kaustubh Bhagwat Sep 06 '17 at 10:30
  • Okay, i'll search for how to create that custom icon . Thanks ! :) – jace Sep 06 '17 at 10:32
  • you are welcome :) – Kaustubh Bhagwat Sep 06 '17 at 10:33
  • https://github.com/leolin310148/ShortcutBadger .. check this out – Adolf Dsilva Sep 06 '17 at 10:38
  • Also [this](https://github.com/B1naryStudio/Xamarin.Badge) is a Xamarin port of Audi's link. I would also check out the pull request as it adds additional compatibility for various other launchers. We use it in our project and it works ok. It will be very difficult to get it working with every single combination of device/manufacturer/3rd party launcher, but this covers quite a few. – hvaughan3 Sep 06 '17 at 15:39

0 Answers0