Skip to content

Firebase InAppMessaging onClickListener still not called #2184

Open
@jonathanfontaine

Description

@jonathanfontaine

What feature would you like to see?

An issue was already filled about this subject here, but I'm still having trouble.

In the Firebase Console, when I click on the "Test Button" to test my In-app Messaging campaign, the message appears in my app. Good.
BUT THEN in my app, when I click on the message default "OK" button, the messageClicked callback is never called.

@JasonAHeron It was supposed to be fixed in a coming release as you said here, any news about that ?

I have the latest version of inappmessaging and inappmessaging-display dependencies in my build.gradle :

implementation platform('com.google.firebase:firebase-bom:26.1.0')
implementation 'com.google.firebase:firebase-core'
implementation 'com.google.firebase:firebase-inappmessaging'
implementation 'com.google.firebase:firebase-inappmessaging-display'
implementation 'com.google.firebase:firebase-analytics'

My HomeActivity onCreate method looks like that :

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    FirebaseInAppMessaging.getInstance().addClickListener(object : FirebaseInAppMessagingClickListener {
        override fun messageClicked(inAppMessage: InAppMessage, action: Action) {
            val url = action.getActionUrl()
            val metadata = inAppMessage.getCampaignMetadata()
            val dataBundle = inAppMessage.data
        }
    })
}

How would you use it?

That would be really useful when setting up the in app messaging for the first time. In my case, I need to check the key/value data passed in the message.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions