Design an Android rich push delivery rich-push
With Firebase Cloud Messaging, you can choose between two types of messages:
-
The Data message is handled by the client app. These messages are sent directly to the mobile application, which generates and displays an Android notification on the device. Data messages contain only your custom application variables.
-
The Notification message, handled automatically by the FCM SDK. FCM automatically displays the message on your users’ devices on behalf of the client app. Notification messages contain a predefined set of parameters and options but can still be further personalized with custom application variables.
Define the content of the notification push-message
Once your push delivery is created, you can define its content. Three templates are available:
-
Default Template allows you to send notifications with a simple icon and an accompanying image.
-
Basic Template can include text, images, and buttons in your notifications.
-
Carousel Template enables you to send notifications with text and multiple images that users can swipe through.
Browse the tabs below to learn how to compose your message for each templates.
-
From the Notification type drop-down, select Default.
-
To compose your message, enter your text in the Title and Message fields.
-
Use dynamic personalization fields to define content, personalize data and add dynamic content. Learn more
-
To further personalize your push notification, configure the Notification options and HTTPv1 additional options of your push notification. Learn more
Once you have defined your message content, you can use test subscribers to preview and test the message.
-
From the Notification Type drop-down, select Basic.
-
To compose your message, enter your text in the Title, Message and Expanded message fields.
The Message text appears in the collapsed view while the Expanded message is displayed when the notification is expanded.
-
Use dynamic personalization fields to define content, personalize data and add dynamic content. Learn more
-
Under the Color options menu, enter the hexadecimal color codes for your Title, Message and Background.
-
Add a Remind later button if needed. Enter your Reminder Text and Date in the corresponding fields.
The Reminder Date field expects a value representing an epoch in seconds.
-
Click Add button and fill in the following fields:
- Label: Text displayed on the button.
- Link URI: Specify the URI to be executed upon clicking the button.
You have the option to include up to three buttons in your push notification. If you opt for the Remind later button, you can only include a maximum of two buttons.
-
Select the Link type of your button’s linked URL:
-
Web URL: Web URLs direct users to online content. Upon clicking, they prompt the device’s default web browser to open and navigate to the designated URL.
-
Deeplink: Deep links are URLs guiding users to specific sections within an app even if the app is closed. When clicked, a dialog can appear, allowing users to choose from various apps capable of handling the link.
-
Open App: Open App URLs allow you to directly connect to content within an application. It enables your application to establish itself as the default handler for a specific type of link, bypassing the disambiguation dialog.
For more information on how to handle Android App Links, refer to Android Developers documentation.
-
-
To further personalize your push notification, configure the Notification options and HTTPv1 additional options of your push notification. Learn more
Once you have defined your message content, you can use test subscribers to preview and test the message.
-
From the Notification Type drop-down, select Carousel.
-
To compose your message, enter your text in the Title, Message and Expanded message fields.
The Message text appears in the collapsed view while the Expanded message is displayed when the notification is expanded.
-
Use the Expression editor to define content, personalize data and add dynamic content. Learn more
-
Under the Color options menu, enter the hexadecimal color codes for your Title, Message and Background.
-
Choose how the Carousel is operated:
- Auto: automatically cycles through images as slides, transitioning at predefined intervals.
- Manual: allows users to manually swipe between slides to navigate through the images.
-
From the Layout drop-down, select Filmstrip option to include previews of the previous and next images alongside the main slide.
-
Click Add image and enter your image URL, Text and Action URL.
Ensure that you include a minimum of three images and a maximum of five images.
-
To further personalize your push notification, configure the Notification options and HTTPv1 additional options of your push notification. Learn more
Once you have defined your message content, you can use test subscribers to preview and test the message.
Push notification advanced settings push-advanced
Notification options notification-options
- Web URL: Web URLs direct users to online content. Upon clicking, they prompt the device’s default web browser to open and navigate to the designated URL.
- Deeplink: Deep links are URLs guiding users to specific sections within an app even if the app is closed. When clicked, a dialog can appear, allowing users to choose from various apps capable of handling the link.
- Open App: Open App URLs allow you to directly connect to content within an application. It enables your application to establish itself as the default handler for a specific type of link, bypassing the disambiguation dialog.
HTTPv1 additional options additional-options
If deactivated, the notification is automatically dismissed when the user interacts with it. The sticky behavior allows important notifications to persist on the screen for longer periods.