Using Firebase In-App Messaging 😍 Lovely feature in your Apps Now

Vipul Thawre
MindOrks
Published in
3 min readAug 18, 2018
UI’s for Firebase In-App Messaging

So here we are gonna discussing the latest released( for BETA use) feature of firebase SDK which is Firebase In-App Messaging πŸ’–

As in the above image you can see there are three User Interfaces, we can say Modal Dialog and most right is a type of Banner UI.

You can use this awesome feature in your app as per your requirement, dynamically. Without writing the single line of code,….Cool na 😘

Firebase In-App Messaging is used to grow your app retention,engagement by sending them targeted contextual messages in the form of Modals and Banners form, that encourage them to use key app features.

πŸ‘‰ You can show Images and Text as well as Actions along with it if user clicks on it, then a particular action will happen. Basically, action will be Dynamic Deep Links

Use cases-

  • Show welcome messages on the app_launch event
  • Show a particular notice on the app_update event
  • Show festival,birthday wish card
  • Show discount offers on a particular day
  • Much more possibilities with it…

Uhh…Enough talk, Let’s see the implementation πŸ˜’

Steps:

  1. Add dependencies
// ...
dependencies {
// ...

// Add the In-App Messaging depencency:
implementation 'com.google.firebase:firebase-inappmessaging-display:17.0.0'


// Check that your Firebase dependency is up-to-date:
implementation 'com.google.firebase:firebase-core:16.0.1'

}

2. Get Firebase Instance ID ( for testing)

Print your firebase instance ID on test mobile with following code

Log.d("Instance ID",FirebaseInstanceId.getInstance().getId());

3. Go to In-App Messaging console

  • Once there, click New Campaign.
  • Enter a Title for your first message.
  • Select UI among three styles ( Modal, Image, Banner) and customize colors as per need
  • Set Matter -Title, Body, and Image Url
  • Click Test on your Device
  • Enter your app’s Instance ID in the Add an instance ID field.
  • Click Test to send the message.

Note : If you want to test, there is one problem. You have to get fresh Firebase Instance ID from code and then add it to test device instance ID in the console and after click on Test button, you should kill your app and then REOPEN it to get the result

And then at last Click on Test and see the output

πŸ‘‰πŸ» Here is my own App and I am using this feature in my app to show Festival wishes greetings ✨ to users

My App

Reference

https://firebase.google.com/docs/in-app-messaging/get-started

#HappyCoding πŸ’»

Clap πŸ‘ , Share and follow me if you like it πŸ˜‰

And also connect with me on social networks Facebook, Twitter, Linkedin

--

--

Vipul Thawre
MindOrks
Writer for

Android Dev 😎 | UX/UI lover ❀️ | Fitness Freak πŸ’ͺ | Ocassionally Blogger πŸ’» | Tech Geek πŸ“± |