Ниже приведен код фонового прослушивателя в файле index.js:
Код: Выделить всё
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);
Буду очень благодарен за любую помощь.
Подробнее здесь: https://stackoverflow.com/questions/791 ... -app-loads
Мобильная версия