From version 3.1.2 of Android SDK (see changelog) , we integrate a specific format that is a combination of the extended notification on Android and notification large format image. You find an overview of the different possible variations , as well as our recommendations for an optimized display of your notifications.Here is the presentation of specific templates used for Android push notifications
BigTextStyle is a native template available from Android 4.1, for displaying multiple lines in extended mode .
BigPictureStyle is the template for this type of notification and is used in 2 cases :
- Case 1 : Short text
- Case 2 : Long text
Notifications have a maximum height limited by the Android system. When displaying, a centerCrop is performed on the image means that the image is scaled preserving its ratio. So that the height and width are at least the size the container. If your message contains many lines , the image height could be reduced resulting as below.
For your own creations, use this following ratios :
- Template bigpicturestyle, short message : 2
- Template bigpicturestyle, long message : 1.8
But to ensure optimal display the message whatever the system sizing , we recommend using a visual image with embedded text in the middle.
When you are creating your notification, for a short message ( 1 line) with an picture, leave the first field blank and fill your message directly in advanced settings > short message to use the template big picturestyle court .
If your message is more than one line with a picture, fill the first field blank “Message” to use the template bigpicturestyle multiligne .
Be careful if you program a message that more than 1 line + picture in the advanced settings, the text may be cut off as on the screenshot below (that why it is better to use the first field provided for multiligne message)