Open In App

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

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 Image only Message Layout. A sample image is given below to get an idea about how Image only 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. We have seen Card, Modal type of notification in our previous article. In this article, we will take a look at the implementation of the Image type of notification in our app. 

Step 3: Implementing Image only Message Layout

In this type of notification we only have to specify the URL of the image which we have to load and the URL which we have to open after clicking on the image. 

Inside the above 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 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 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:


Last Updated : 02 Mar, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads