I am using react-native-firebase@5.2.3. I had created a headless task to receive the data notification, and my server is sending me a data notification but it is not reflecting in my application although i had created the event for this. It is working finely in android < v7. But not working in android version > v7.
I'm not getting anything in console, while server has sent me the data-only notification. Once this callback on headless task execute i will code here to show notification but there is no event triggering.
My code is given below.
import {AppRegistry} from 'react-native';
import 'babel-polyfill';
import App from './App';
import {name as appName} from './app.json';
console.disableYellowBox = true;
const bgMessaging = async(messages) => {
console.log("BgMessaging",messages);
return Promise.resolve();
};
AppRegistry.registerHeadlessTask('RNFirebaseBackgroundMessage', () => bgMessaging);
AppRegistry.registerComponent(appName, () => App);