Android notifications are not working and not able to receive notification when app is kill state and the same is working fine with iOS.
Any suggestion for the same because one app is live and same is not working there.
Android notifications are not working and not able to receive notification when app is kill state and the same is working fine with iOS.
Any suggestion for the same because one app is live and same is not working there.
Hey Leap,
Did you find any solution for this not able to get the notifications in the kill state
@Tyler would be helpful if you can look into this
I solved it as follows:
Basically edit your â./index.jsâ to include the following
import {AppRegistry} from 'react-native';
import messaging from '@react-native-firebase/messaging';
import App from './App';
import {name as appName} from './app.json';
// Kill state Notification Listener.
messaging().setBackgroundMessageHandler(async remoteMessage => {
// Your code to handle notifications in killed state. For example
console.log('Killed state notification.', remoteMessage)
});
AppRegistry.registerComponent(appName, () => App);