5

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!

Kyudong3
  • 53
  • 3
  • Hello @Kyudong3, have you found how to implement it? Documentation is very scarce and I'm stuck. Thanks – Jon Jun 04 '20 at 00:58
  • 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 ios – sejn Jun 15 '23 at 13:28

1 Answers1

-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

Arunachalam k
  • 734
  • 1
  • 7
  • 20
  • 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 appeared – Kyudong3 Apr 06 '20 at 07:49
  • could you please provide a small demo on it – yogesh lokhande Jun 11 '20 at 18:24
  • Any inputs on this. – sejn Jun 06 '23 at 10:29
  • 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 ios – sejn Jun 15 '23 at 13:27