I want to receive a data-only notification and depending upon data I want to hit an api..
While app is in foreground everything is working fine as onMessage triggered, but in background the firebase.messaging().onMessage not triggered even I send "content_available" : true with data payload.
I read instructions giving in the link giving below.
https://github.com/invertase/react-native-firebase-docs/blob/master/docs/messaging/introduction.md
here is my code:
this.messageListener = firebase.messaging().onMessage((message) => {
//want to hit api depending upon coming data
Testing on iPhone 6S plus (real device)
react-native : 0.58.5
react-native-firebase : 5.5.4
I want to receive a data-only notification and depending upon data I want to hit an api..
While app is in foreground everything is working fine as onMessage triggered, but in background the firebase.messaging().onMessage not triggered even I send "content_available" : true with data payload.
I read instructions giving in the link giving below.
https://github.com/invertase/react-native-firebase-docs/blob/master/docs/messaging/introduction.md
here is my code:
this.messageListener = firebase.messaging().onMessage((message) => {
//want to hit api depending upon coming data
Testing on iPhone 6S plus (real device)
react-native : 0.58.5
react-native-firebase : 5.5.4