SaFi Bank Space : Push Notification FE

FE use awesome notification to handle foreground PN.
Background and terminated state are handle by ably PN.

We have difficulties to show PN with image.
Somehow awesome notif bigPicture is not work on ios side.
It seems on ios side need to add notification content extention.
So we pending to add PN with picture functionality.

For testing PN directly (without output manager/push notif gateway) we can use below API.

End Point

https://rest.ably.io/channels/customer:{customerId}/messages


Simple Payload
this payload will send basic payload for both Android and IOS devices.

{
    "extras": {
        "push": {
            "notification": {
                "title": "title",
                "body": "body"
            }
        }
    }
}

Override FCM
this payload will send PN with image on Android devices(Background and terminated state)
on foreground, only title and body.

{
    "extras": {
        "push": {
            "notification": {
                "title": "this will be override",
                "body": "this will be override"
            },
            "fcm": {
                "notification": {
                    "image": "https://www.dw.com/image/49519617_303.jpg",
                    "title": "new title",
                    "body": "new body"
                },
                "android": {
                    "priority": "high"
                }
            }
        }
    }
}

Overrider APNS
this payload will send basic PN to IOS devices.

{
    "extras": {
        "push": {
            "notification": {
                "title": "this will be override",
                "body": "this will be override"
            },
            "apns": {
                "aps": {
                    "alert": {
                        "title": "new title",
                        "body": "new body"
                    },
                    "mutable-content": 1
                }
            }
        }
    }
}




(blue star) Related articles