How can I include contents-available when sending GCM messages via pinpoint?

0

I want to send push notification to my iOS application by FCM service.

I created a pinpoint project, and when I send as below in lambda, application receive messages well.

let params = {
    ApplicationId: applicationID /* required */,
    SendUsersMessageRequest: {
      /* required */
      MessageConfiguration: {
        /* required */
        GCMMessage: {
          "RawContent": `{\"notification\": {\"title\": \"${title}\",\"body\":\"${message}\", \"sound\":\"default\"}, \"content_available\": \"true\"}`
        },
      },
      Users: users,
    },
  };

  try {
    return await pinpoint.sendUsersMessages(params).promise();
  } catch (err) {
    console.log('Error - ', err);
  }

And I want to contain content_available value for iOS background handler, but when application received message this value is deleted like below.

 LOG  A new FCM message arrived! {"messageId":"1656044924598337","data":{"pinpoint.campaign.campaign_id":"_DIRECT"},"notification":{"body":"TEST body","sound":"default","title":"TEST title"},"from":"560179008583"}

How can i contain contents-available value in GCMMessage?

Please share the guided or advice.

Thanks

已提問 2 年前檢視次數 86 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南