Firebase-android-sdk: InApp Messaging | Postpone messages

Created on 2 Mar 2020  路  4Comments  路  Source: firebase/firebase-android-sdk

Hi there,

I have issue with showing in-app messages on main activity.
When app launches first time it starts SplashScreenActivity and then finishes it and starts MainActivity also could be that it start SignInActivity betwwen them. So the issue that I need to show messages not on SplashScreenActivity but on MainActivity when it starts.
Unfortunatelly playing around methods:

FirebaseInAppMessaging.getInstance().setMessagesSuppressed(true)
.....
FirebaseInAppMessaging.getInstance().setMessagesSuppressed(false)

Didn't help.

Can anyone help with it? I want to understand why messages not shown to user when i set suppressed false

I'm using button Test on device from firebase console to send messages and it needs to restart the app.

needs-triage

All 4 comments

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@Hospes
I have the same problem, too.
I think it could be solved by the following method.
MainActivity.kt override fun onResume() { // MainActivity.kt super.onResume() FirebaseInAppMessaging.getInstance().setMessagesSuppressed(false) Handler().postDelayed({ FirebaseInAppMessagingDisplay.getInstance().onActivityResumed(this) }, 1000) }

why messages not shown to user when i set suppressed false

This is because only the flag has been changed and the display processing has not been called.
So, I call FirebaseInAppMessagingDisplay.getInstance().onActivityResumed(this) manually.

@tatsuhama thank you !

@tatsuhama Didn't help me, still no messages.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wangjiejacques picture wangjiejacques  路  5Comments

quiro91 picture quiro91  路  5Comments

piotrkst picture piotrkst  路  5Comments

ANR
RodolfoGS picture RodolfoGS  路  4Comments

Belka1000867 picture Belka1000867  路  3Comments