expo-notification FCM protocol messaging

Please provide the following:

  1. SDK Version: “expo”: “~38.0.8”, “expo-notifications”: “~0.5.0”, “expo-permissions”: “~9.0.1”, “expo-status-bar”: “^1.0.2”, “react”: “~16.11.0”, “react-dom”: “~16.11.0”, “react-native”: “^0.62.2”,
  2. Platforms(Android/iOS/web/all): Android

Hello! Can you provide example of correct request to FCM.
In current documentation state “you shouldn’t send the notification object, cause then the remote message doesn’t go through expo-notifications code. The body and title you can move to the data object.”

But if I move all to data object nothing happens, can’t see any notification.

in this example message duplicate two times:
curl -X POST -H “Authorization: Bearer TOKEN” -H “Content-Type: application/json” -d ‘{
“message”:{
“token”:${DEVICETOKEN},
“notification”:{
“body”:“This is an FCM notification message!”,
“title”:“FCM Message”
}
}
}’ “https://fcm.googleapis.com/v1/projects/myproject-11111/messages:send

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.