Reputation: 103
When my database record is updated on the server it sends a push notification to the Android app user through FCM. The notification is sent but the badge count on the device is not updated. How do I set the notification to change the badge app icon?
Upvotes: 1
Views: 2934
Reputation: 3256
In Android this doesn't happen automatically like it does with the iOS implementation. You'll have to handle this yourself by overriding the onMessageReceived
method - see https://firebase.google.com/docs/cloud-messaging/android/receive. The badge count can then be updated using something like https://github.com/leolin310148/ShortcutBadger to make things easier.
Upvotes: 1