Hi, I'm trying to set up some push notifications campaigns via Pinpoint, but I'm having troubles with notifications to Android.
I have both a iOS and an Android endpoint correctly subscribed. iOS works properly.
On Android, I can see push events coming through FCM (authentication is fine)^1, however, nothing is shown.
I have the impression Pinpoint is sending data messages instead of notifications^2, and using an Android service^3 to handle them as user notifications. However, our app is a Capacitor app, Cognito authentication and Pinpoint are handled as JavaScript code, so we're using Amplify JS, not Amplify Android.
If I try to send this payload, nothing is shown:
{
"MessageConfiguration": {
"GCMMessage": {
"Title": "hello",
"Body": "world"
}
}
}
On the other hand, this works:
{
"MessageConfiguration": {
"GCMMessage": {
"RawContent": "{\"notification\":{\"title\":\"hello\",\"body\":\"world\"}}"
}
}
}
The problem is that Pinpoint campaigns use the former. The idea of Pinpoint would be to delegate creating campaigns to a non-technical marketing team, but we find it hard to do when one of the steps would be "prepare your message with this JSON format then stringify it" 🥲
Am I misconfiguring something? Is there a way to get Pinpoint to behave consistently between iOS and Android?