0

I want to send badge from firebase-admin to applications. I can send badge to iOS apps and show its on app icon but in android can not. how can send badge from firebase-admin to android applications and show its on app icon?

1 Answers1

1

App badge appears on application icons when notification as pending. So, To display a badge on the app icon you have to send notification using firebase.

But for android, the badge supports above android 8.0 (API level 26). You can check the official document for that.

If you want to implement for all android versions then you can get the help of custom libraries like this one.

Jaymin
  • 2,879
  • 3
  • 19
  • 35
  • use ShortcutBadger but when my app is closed android version <8 can not get and show badge from server in react native. – Forozande Ghoreishi Jan 30 '20 at 09:10
  • 1
    Make sure you have implement service for badge. here it is https://github.com/leolin310148/ShortcutBadger/blob/master/SampleApp/src/main/java/me/leolin/shortcutbadger/example/BadgeIntentService.java – Jaymin Jan 30 '20 at 09:20
  • I use react native framework to develop my apps. how can use this service in react native? – Forozande Ghoreishi Feb 01 '20 at 05:06