buffoon
Lurker
I want to change the notification badge count, say, whenever the user clicks on a button. At the moment, the only way I know to change the notification badge count is by sending a notification like so:
I could technically send a notification every time the user presses the button, but that'd clutter the notification panel (as the goal here is to just change the badge count). So, is there anyway I can change the notification badge count without sending a notification?
Java:
Notification notification = new NotificationCompat.Builder(MainActivity.this, CHANNEL_ID)
.setContentTitle("New Messages")
.setContentText("You've received 3 new messages.")
.setSmallIcon(R.drawable.ic_notify_status)
.setNumber(messageCount)
.build();
I could technically send a notification every time the user presses the button, but that'd clutter the notification panel (as the goal here is to just change the badge count). So, is there anyway I can change the notification badge count without sending a notification?