I want background listener to update status, just like firebase provide us messages().setBackgroundMessageHandler.
One signal version
"react-native-onesignal": "^4.0.3",
I want background listener to update status, just like firebase provide us messages().setBackgroundMessageHandler.
One signal version
"react-native-onesignal": "^4.0.3",
Copyright © 2021 Jogjafile Inc.
hi guys I found a solution Just use this code:
messaging().setBackgroundMessageHandler(async remoteMessage => { console.log('Message handled in the background!', remoteMessage); });
Here in this code firebase will take care and get one signal's background notifications. One signal doesn't have any handler to fetch the background notifications in react native.
I hope this solution works.