Closed javitolin closed 2 years ago
Found a fix. Need to
# Install & setup the app module
yarn add @react-native-firebase/app
# Install the messaging module
yarn add @react-native-firebase/messaging
And then add at index.js:
import messaging from "@react-native-firebase/messaging";
// Register background handler
messaging().setBackgroundMessageHandler(async (remoteMessage) => {
console.log("Message handled in the background!", remoteMessage);
});
As the title says, when I'm receiving a notification in the background, react-native logs a warning to the console specifying:
No task registered for key ReactNativeFirebaseMessagingHeadlessTask
What am I missing in the configuration? I tried to look at it in the example but found nothing.. Thanks