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

gefragt vor 2 Jahren87 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen