Somebody can use fcm with countly push notification for countly-sdk-js?


#1

We try but the push notification only can see when the app is open, if the app es backgrounf or killed the android does not show.

We think that the payload is incorrect, we need some help for use fcm plugin ionic with countly push.

Thanks in advance.


#2

@artem FYI, same question.


#3

I cannot really answer this, better asking SDK dev @gorkem. Who was it?


#4

Thanks, checking that on Slack.


#5

This is the correct payload for FCM:
{
"notification":{
"title":"Notification title",
"body":"Notification body",
"sound":"default",
"click_action":"FCM_PLUGIN_ACTIVITY",
"icon":"fcm_push_icon"
},
"data":{
"param1":"value1",
"param2":"value2"
},
"to":"/topics/topicExample",
"priority":"high",
"restricted_package_name":""
}

I tried with a curl function and the app working good, shows the push notificaition when the app is closed. That confirms the payload is being send wrong from dashboard countly.


#6

@aaronyamil We handle notifications in SDK, so there is no right or wrong here. You can send any data and handle it in any possible way.


#7

Yes, But the FCM payload is different that GCM payload. So at this moment counly daskboard send payload like GCM. We need to use FCM format.


#8

Aaron, there is no such thing as FCM format in regards to Countly. Our SDKs handle notification payload thus it can be in any format. Since Countly supports easy migration from GCM to FCM, we won't change the format in any near future.

Your problem comes from the fact that our js SDK is being updated with FCM support in this particular moment it seems. I've added Nicolson to email thread, so let's see what he says.


#9

Arthem, thanks for your reply.
This issue es very important for us. Yesteday Alvaro Molina changes some code in countly-server with FCM payload and the push notifications started arriving when the app was closed.

Please confirm if the issue has in countly-server or countly-sdk-js.

Thanks in advance.


#10

I don't get it - what do you mean?


#11

Yesterday we made changes to the countly-server and the push notification started arriving when the app was closed. That tells us that the fix should be on the countly-server.
But you tell me that the countly-sdk-js has to manage the FCM push notification, therefore, the fix would be on that side.

Please, could you confirm if the fix is in the countly-server or in the countly-sdk-js?


#12

It's SDK issue for sure.


#13

Thanks Artem, We are working on that.