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.
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:
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.DEFAULTin 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.
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:
Points to Note
- The image should already be present in the
res/drawablefolder of the project.
- Supported file types are .jpg, .jpeg and .png.
Updated 23 days ago