firebase / firebase-android-sdk

Firebase Android SDK
https://firebase.google.com
Apache License 2.0
2.27k stars 575 forks source link

Possibility to programmatically dismiss an InApp Message #3458

Open MarceloMaia2 opened 2 years ago

MarceloMaia2 commented 2 years ago

What feature would you like to see?

The possibility to programmatically dismiss an InApp Message

How would you use it?

FirebaseInAppMessaging.getInstance().dismissAll();

google-oss-bot commented 2 years ago

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

argzdev commented 2 years ago

Thanks for the request, @MarceloMaia2. Our engineers will take a look at this once they have the time.

MarceloMaia2 commented 2 years ago

Thanks for the request, @MarceloMaia2. Our engineers will take a look at this once they have the time.

Is there currently another way to programmatically dismiss an InApp Message? @argzdev

thatfiredev commented 2 years ago

@MarceloMaia2 I'm wondering in which cases would you need to programmatically dismiss it? Considering that an in-app-message usually interrupts the user and they have no option but to either click or dismiss it.

MarceloMaia2 commented 2 years ago

@MarceloMaia2 I'm wondering in which cases would you need to programmatically dismiss it? Considering that an in-app-message usually interrupts the user and they have no option but to either click or dismiss it.

@thatfiredev When we are dealing with sessions. An in-app-message interrupts the user and for example, he can block the smartphone and when he unblocks (2/3 minutes after), the application will send him to the login page, due to expiration session and the in-app-message is still going to be active.

thatfiredev commented 2 years ago

@MarceloMaia2 Ah, I see. Thanks for clarifying.

MarceloMaia2 commented 2 years ago

Hello @thatfiredev , there are any relevant updates for this issue? Thanks in advance.

thatfiredev commented 2 years ago

@MarceloMaia2 Thanks for the gentle reminder. I've filed this internally and I'm waiting for one of our engineers to take a look at it. We'll update this thread when a response comes in.

argzdev commented 2 years ago

Hi @MarceloMaia2, sorry for the late response!

While there's currently no way to dismiss an InAppMessage programmatically. You could modify this by customizing the look and behavior of your message, though it may require a lot of work but this will definitely allow you to achieve what you need in your use case.

Alternatively, you can consider temporarily disabling in-app messages programmatically. It might help with this use case while waiting for an update for this feature request.