Open In App

How to Implement Modal Message Layout of Firebase In-App Messaging in Android?

Last Updated : 02 Mar, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

Prerequisite: How to Push Notification in Android using Firebase In-App Messaging?

We have seen the implementation of Firebase In-App Messaging in Android. In that article, we have implemented the Card Message Layout. In this article, we will take a look at the implementation of the Modal Message Layout. A sample image is given below to get an idea about how Modal Message Layout looks like.

Step by Step Implementation

Step 1: Creation of our app

In the previous article (How to Push Notification in Android using Firebase In-App Messaging?) We have already created our first part. We have to use a similar app. We don’t have to make any changes to that app. Check out the first part to take a look at the implementation of Firebase In-App Messaging in that app. 

Step 2: Navigate to Firebase Console and Navigate to In-App Messaging.  

Browse Firebase Console inside your browser and click on the In-App Messaging tab on the left pane, and you will get to see the below screen.  

After clicking on Create your first campaign it will ask for integration of Firebase Analytics select your analytics account and proceed further. After specifying your Google Account for analytics you will get to see the below screen to design your notification which we want to display.  

Step 3: Implementing Modal Message Layout

Now in the above image, you will get to see different usages of the fields as we scroll down we will get to see the below screen.  

In the above screen, we are adding a button to perform clicks on our notifications and add action to our button inside our notification. After clicking on the Next option we will get to see the below screen.  

Inside the below screen, we have to add campaign name and description to our campaign we can specify any name and description to our campaign, and now we have to select the app to which we have to send the notification. After selecting your app click on the Next option to proceed further. After clicking on the next option you will get to see the below screen.  

Inside this screen, we have to schedule our notifications when we have to send our notifications to our users. Inside this, we can modify our time and schedule our notification. After scheduling our notification click on the Review option and you will get to see a pop-up option. Inside this option click on Publish option to publish your notification. Make sure to add your device installation ID for sending your notification. After sending this notification it will take some time to display inside your app. Make sure to close and reopen your app to display your notification. You will get to see the notification in your Android app.  

Output:


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads