1

According to the documentation: https://rnfirebase.io/messaging/usage I want to display the background notification from firebase but with custom configuration, like a custom icon, custom data, and custom function on tapping on a notification.

// index.js
import { AppRegistry } from 'react-native';
import messaging from '@react-native-firebase/messaging';
import App from './App';

// Register background handler
messaging().setBackgroundMessageHandler(async remoteMessage => {
  console.log('Message handled in the background!', remoteMessage);
});

AppRegistry.registerComponent('app', () => App);

How to customize this?

Zbigi Man
  • 47
  • 1
  • 4

1 Answers1

0

https://github.com/invertase/react-native-firebase/issues/3826#issuecomment-648903659

As per this statement and also referring the doc, react native firebase version 6+ messaging only supports cloud integration and simple notification display.

If you need extra configuration while displaying a notification, you should use any other local notification library like "Notifee"

Dhevendhiran M
  • 994
  • 2
  • 12
  • 29