I’m just receiving a background notification when I open the app and return it back to the background state, no notifications are receiving in the background after that on Android 14. Notifications are working as expected till Android 13.
Below is the code for background listener in index.js file:
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
import messaging from '@react-native-firebase/messaging';
messaging().setBackgroundMessageHandler(async remoteMessage => {
console.log('Notification for Background:', remoteMessage);
});
AppRegistry.registerComponent(appName, () => App);
I also have the POST_NOTIFICATIONS permission in the manifest file.
Any help would be greatly appreciated.
You need to sign in to view this answers