Skip to content

Rich Push Notifications

Andras Sarro edited this page Jan 30, 2023 · 7 revisions

Contents

What are rich notifications?

Rich notifications enable you to send images within push messages. It is also possible to have a Title and a Body element of your message.

How to send Rich Notifications?

Please consult the Mobile Engage documentation

How to implement the rich notifications feature?

When using the Emarsys SDK with Android, there is no additional modification needed to use rich notifications.

The JSON format for rich notifications

By default, on Lollipop and earlier versions, if the title is missing, the SDK inserts the name of the application into the title. From Marshmellow version onwards, the name of the application is already displayed by default, so nothing is inserted in the title.

If customers do not want the application name as title, they can provide a title in the ems_default_title custom data field.

The payload has the following format:

{
    "title":"Game Request",
    "body":"Bob wants to play poker",
    "image_url":"https://www.xxx.jpg" //if_we_want_an_image
}

Note

The image url must be https.

Restrictions and limitations

The service has some limitations in its usage.

Mode Type
Text Image
Notification panel collapsed Title is one line and it is truncated if too long.
Body is one line and it is truncated if too long.
Title and body length varies between 20 and 55 characters, based on screen density.
The small image preview is shown center-cropped.
Title is one line and it is truncated if too long.
Body is one line and it is truncated if too long.
Title length varies between 20 and 55 characters, based on screen density.
Title and body length varies between 20 and 55 characters, based on screen density.
Notification panel expanded Title length varies between 20 and 80 characters, based on screen density.
Body length varies between 200 and 460 characters, based on screen density.
The image is shown in larger. The preview image disappears.
Title is one line and it is truncated if too long.
Body is one line and it is truncated if too long.
Title length varies between 20 and 80 characters, based on screen density.
Body length varies between 20 and 90 characters, based on screen density.
Lockscreen Expanded notifications are available from API level 16. Title length varies between 20 and 55 characters, based on screen density. Body length varies between 200 and 700 characters, based on screen density.
Heads up Heads-up notifications are not supported.

Note

The notification will crop text if longer, no scrolling.

Images

Keep images between 800 and 1,038 px wide.

Always use landscape orientation, as rich push notifications on Android are cropped to something close to 16:9 (the exact ratio changes depending on the device).