0

I have a Android and iOS app that today is using Firebase "notification messages" (that is with a notification-key in the JSON). Now I would like to customize the default notification using native Android APIs (and stuff from the data-key in the JSON).

However, because I'm using the notification-key the app will not receive the onMessageReceived when in background (as is documented by Firebase and here on SO).

If I were to remove the notification-key to make it work with new native code the users that haven't upgraded the app would stop to receive notifications, making it a unattractive solution.

Is there a way of overriding Firebase "notification messages" so it will work with both old and new versions of my app or is there another "best practice"?

(In iOS the "notification messages" can be handled like any other push notification.)

Paso
  • 343
  • 2
  • 3
  • 13

0 Answers0