Android Push Notification Templates

Use different template designs for your push notifications as per the content.

Starting version 1.3.3 for the iZooto SDK (both Native and PowerPush), you would be able to use different template designs for your push notifications as per the content being sent in the campaigns.

Text Overlay Template

The Android Text Overlay template ensures that the background image covers the entire available surface area of the push notification with zero bezels. All the text is overlaid on the image. This works in both expanded and collapsed views.

This template is available for use which focuses on the Title & the Banner Image only to provide a bezel-less experience to your end-users.

In order to use this custom template, you can use the below method in the main Application class:

iZooto.setDefaultTemplate(PushTemplate.TEXTOVERLAY);

This would override the default behavior and would use the new Text Overlay template.

🚧

Points to Note

  • This method is available only for iZooto SDK versions 1.3.3 and above.
  • You can pass PushTemplate.DEFAULT in the method to default to the normal Android notification template.

👍

Done! You're all set to use the new Android Text Overlay Template and woo your end-users.



Set Default Notification Banner Image

If you plan to use the Text Overlay custom template (as defined above), it is a good practice to define a default banner image to be used with the notification in case the actual banner image does not load due to network issues, etc. This would ensure that the notification is always pushed with a banner image.

In order to define the default banner image, you can use the below method in the main Application class:

iZooto.setDefaultNotificationBanner(R.drawable.Image_name);

🚧

Points to Note

  • The image should already be present in the res/drawable folder of the project.
  • Supported file types are .jpg, .jpeg and .png.

Did this page help you?