1

I'm working at an app that is completely based on Firebase tools hence I adopt FCM to send push notifications. Talking about notifications my app receives when it's in foreground, they perfectly work and I manage to handle it as I want through FirebaseMessagigService and onMessageReceived method in particular.

Unfortunately this method seems to be completely transparent when the app is in background...I've attempted many different ways, and tried to follow as many as possible official tutorials and stack overflow suggestions, but there's a lot of contradictory information and I definitely don't succeed in changing the notification icon as I'd like to do. I have to accept the white and grey circle the system proposes to me but this is certainly not a good presentation for an app. :-(

Is there someone who has the key to solve this problem and/or has understood which the final word from Firebase team could be? Thank you very much.

AL.
  • 36,815
  • 10
  • 142
  • 281
Prezy
  • 21
  • 2

1 Answers1

1

Yep! You can set which icon to use in your manifest file.

<meta-data
    android:name="com.google.firebase.messaging.default_notification_icon"
    android:resource="@drawable/ic_stat_ic_notification" />
Ian Barber
  • 19,765
  • 3
  • 58
  • 58
  • Unfortunately this doesn't seem to be the right way. I've tried but this solution doesn't work in my case and I really can't explain the reason. – Prezy Mar 17 '17 at 13:53