I am trying to set up a react-native project using @trycourier/react-native-inbox. I have successfully received in-app notifications. Now, I am trying to enable push notifications and trying to configure the FCM channel for push notifications. I have a few questions about its process.
In the documentation, it says to paste the complete contents of the JSON file you download from Firebase into the configuration field. What is a configuration field?
Your Firebase configuration field is inside the FCM integration settings where you can initially set up Firebase.
Once you have the Firebase registration token, you need to include this token inside the “message” object of your Send request. There are no additional params that need to be included in the profile.
function registerDevice(token: string) {
const headers = {
Authorization: 'Bearer pk_prod_M27KK4DRC54G1GJB6HZA9NG89MF8'
}
const body = {
message: {
template: "2NAGY3ZZQYMDYVN1E1PHEJAW0T9A",
to: {
firebaseToken: token
},
},
}
axios.post('https://api.courier.com/send', body, {
headers: headers
}).then(res => { console.log(res.status) }).catch(err => { console.log(err) })
}```
Also, I configured my FCM as displayed in the image:
![Screenshot 2022-07-19 at 12.43.49 PM|656x500](upload://uQ6HdVCTbBuEdHYRRAxBO45IuXv.png)
When I send the push notification using the FCM channel, I get the notification in the inbox but the notification banner does not appear on my device. What should be done to make that appear?