how to customize firebase in-app messaging messages in android?
Asked Answered
I

1

6

I've tried to customize firebase in-app messaging to change layout of the messages, but I failed it.

I followed documents in firebase - https://firebase.google.com/docs/in-app-messaging/customize-messages but couldn't understand what it means. It's little bit confusing.

In documentation, it seems quite easy. First, write my own FirebaseInAppMessagingDisplay class and register this to headless firebase In-App messaging sdk.

I tried in 2 ways.

First, import firebase in app messaging display module in android studio project. But gradle error occured.

next, I tried to make my own in-app messaging display class, but also failed.

on my knowledge, I need more reference but I can't find it.

I need some help!

Imbroglio answered 2/4, 2020 at 5:20 Comment(2)
Hello @Kyudong3, have you found how to implement it? Documentation is very scarce and I'm stuck. ThanksLoco
Any details to customize the In-App messaging? Can I show a popup with two button and the header title and subtitle for the popup and show for Firebase In-app messaging in iosFragmentary
M
-1

U Should create your own FirebaseInAppMessageDisplay class by implementing

FirebaseInAppMessagingDisplay, Application.ActivityLifecycleCallbacks

like below https://github.com/firebase/firebase-android-sdk/blob/master/firebase-inappmessaging-display/src/main/java/com/google/firebase/inappmessaging/display/internal/FirebaseInAppMessagingDisplayImpl.java

InAppMessage Object will receive as a parameter in the DisplayMessage callback method

InAppMessage Object will consist of title, body,imageUrl,campaignId,campaignName

Using BindingWrapper u can create your own layout

Press Ctrl + N navigate to FirebaseInAppMessaging Display class for more reference (com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplay )

For Reference

https://firebase.google.com/docs/in-app-messaging/customize-messages?platform=android

Mazman answered 2/4, 2020 at 6:24 Comment(4)
I just created FirebaseInAppMessageDisplayImpl class and used displayMessage function. but in-app message didn't occur when I trigger event. Like FirebaseInAppMessaging.getInstance().triggerEvent("event"); . I received data but modal is not appearedImbroglio
could you please provide a small demo on itRowdyism
Any inputs on this.Fragmentary
Any details to customize the In-App messaging? Can I show a popup with two button and the header title and subtitle for the popup and show for Firebase In-app messaging in iosFragmentary

© 2022 - 2024 — McMap. All rights reserved.