android


Android - how to add a badge count to an application icon?


how to add badge count on app icon on homescreen , like inbuilt gmail app, facebook app.
I can run with Samsung and Sony devices. But others like Motorola , Micromax, HTC , LG does not sets Badge.
So how to set badge count for all android devices?
It is currently not possible to target "all android devices", only for some.
Certain manufacturers (e.g. Samsung notably) have included this functionality into their customised Android launchers. Also some 3rd-party launchers (e.g. Nova Launcher) have included an API to accomplish this.
Stock Android does not offer this functionality at the moment on the standard launcher.
I have just seen that this is a duplicate of:
Is there a way to add a badge to an application icon in Android?
There are many other related posts about this type of thing:
How does Facebook add badge numbers on app icon in Android?
Does Samsung modifies it's Android ROMs to have badges on email and SMS icons?
adding notification badge on app icon in android
How do you interface with BadgeProvider on Samsung phones to add a count to the application icon?
How to add a notification badge/count to application icon on Sony Xperia devices?
How to make application badge on android?
How to display count of notifications in app launcher icon
You can find more information there.
You can use library that bring you this ability.
ShortcutBadger is one on them that support many launchers.
For use this library you can add it to your gradle build dependency like this:
dependencies {
compile 'me.leolin:ShortcutBadger:1.1.4#aar'
}
And add Badge like this:
ShortcutBadger.applyCount(context, badgeCount);

Related Links

How do you make 4 2x2 buttons having the same dimensions
android, application crashes when trying to open a certain activity
Is there a way to make your android app listen to home screen launcher double tap?
Android OpenGL ES 2.0 multiple textures and Camera
Android ViewPagerIndicator - UnderlinePageIndicator on top instead of bottom?
SQLite doesn't open database in android
Play audio on button click in viewpager efficiently in android
Keeping a DB updated - Android
Emulator crashing when trying to run an application with multiple images [duplicate]
using Buttons to retrieve data from database
Not getting Lat and Long through either GPS or Network
Read Android database.db file from asp.net [closed]
Android: Recommended workaround for google-drive-sdk timeout issue?
Changing string value in OnClick
How to open ViewPager with specified page. (by default it loads 1st 3 pages)
How to handle collections with the Visitor pattern?

Categories

HOME
phantom-dsl
phpword
jax-rs
mjml
angular-formly
sitecore
can
nuget
nsbundle
zip
missing-data
azure-container-service
webix
syntaxnet
project
dkim
ibeacon-android
jxl
parameter-passing
package.json
nim
database-connection
asciidoctor-pdf
gulp-watch
angular-routing
exit
short-url
comparator
pylons
tpm
android-sugarorm
hard-drive
android-maps-extensions
instantiation
activexobject
openwhisk
joomla2.5
hibernate-search
jwplayer6
magento-1.9.2.4
z-notation
unordered-map
datacachefactory
branching-and-merging
postgresql-8.4
textsum
vugen
remedy
semantic-logging
boxing
css-transforms
reshape
libjpeg
mouseleave
trigger.io
structuremap4
javafx-css
webjars
qtplugin
burrows-wheeler-transform
nikeplus-api
delta
observablecollection
pre-build-event
dbamp
halcon
nio2
ascii-art
avisynth
jdi
google-books
coda
linked-tables
teamcity-9.1
gamekit
code-documentation
public-html
cryptographichashfunction
delayed-execution
android-cookiemanager
spy++
linkedin-jsapi
human-computer-interface
universal-image-loader
ios8-extension
vbe
kendo-dataviz
oocss
unit-of-work
preload
resource-management
wimax
idn
pyunit
subproject
objectquery
jdb
node-redis
unattended-processing
facebook-iframe
non-clustered-index
eclipse-marketplace
tui

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App