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

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.

0

Comments

12 comments
  • @artem FYI, same question.

    0
    Comment actions Permalink
  • I cannot really answer this, better asking SDK dev @gorkem. Who was it?

    0
    Comment actions Permalink
  • Thanks, checking that on Slack.

    0
    Comment actions Permalink
  • 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.

    0
    Comment actions Permalink
  • @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.

    0
    Comment actions Permalink
  • 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.

    0
    Comment actions Permalink
  • 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.

    0
    Comment actions Permalink
  • 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.

    0
    Comment actions Permalink
  • aaronyamil:

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

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

    0
    Comment actions Permalink
  • artem:

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

    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?

    0
    Comment actions Permalink
  • It's SDK issue for sure.

    0
    Comment actions Permalink
  • Thanks Artem, We are working on that.

    0
    Comment actions Permalink

Please sign in to leave a comment.