firebase / firebase/firebase-android-sdk
Firebase InAppMessaging onClickListener still not called
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 710
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 31
Description
## What feature would you like to see?
An issue was already filled about this subject [here](https://github.com/firebase/firebase-android-sdk/issues/681), 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](https://github.com/firebase/firebase-android-sdk/issues/681#issuecomment-524036730), 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.
Contributor guide
Assessment
This issue has not been assessed yet.