Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to add a badge to an application icon in Android?

On the iPhone, you can add a numbered badge to the application icon. On BlackBerry, I've successfully painted an image onto the application's icon while in the program. I want to do this for Android as well. I don't want to use the notification bar, as it's not something that needs to be notified instantly. Instead, I just want the user to be able to see how many new messages are in the application just by looking at the application icon.

like image 357
groomsy Avatar asked May 25 '10 14:05

groomsy


People also ask

Does Android have app badges?

Starting with 8.0 (API level 26), notification badges (also known as notification dots) appear on a launcher icon when the associated app has an active notification. Users can long-press on the app icon to reveal the notifications (alongside any app shortcuts), as shown in figure 1.

What is an icon app badge?

The app icon badge tells you there's a new notification or message waiting for you when you open the app, and the badge count tells you how many notifications there are.


1 Answers

Unfortunately, Android does not allow changing of the application icon because it's sealed in the APK once the program is compiled. There is no way to programmatically change it to a 'drawable'.

You may achieve your goal by using a widget instead of an icon. Widgets are highly customisable and can do what you want.

There's a short discussion about the difference between iPhone icon notification and using widgets here:

http://www.cnet.com/8301-19736_1-10278814-251.html

As you'll notice, there is virtually no difference between using a widget or an icon, since they can be the same size and look the same.

like image 94
HXCaine Avatar answered Sep 22 '22 15:09

HXCaine