Open ifanfairuz opened 3 years ago
I don't remember if had the same problem or just i wanted to get rid of a warning, but maybe it can help.
I fond this issue https://github.com/zo0r/react-native-push-notification/issues/1454
export const setAndroidBackgroundMessageHandler = () => {
if (Platform.OS === 'android') {
messaging().setBackgroundMessageHandler(async remoteMessage => {
console.log('Message handled in background!', remoteMessage);
});
}
};
And i use it in the index.js
setAndroidBackgroundMessageHandler();
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.
version that i used:
I tried to show local notification triggered by firebase-messaging data only with manipulate data before show it
on foreground notification is shown but on background state notification not show except I open the app
my index.js
init notification
my manifest
firebase.json