[In App Messaging] FirebaseInAppMessagingDisplay doesn't notify image download failure
Environment
- Android Studio version: Android Studio Flamingo | 2022.2.1 Patch 1
- Firebase Component: In App Messaging - Display & In App Messaging
- Component version: 20.3.2
Problem
InAppMessagingErrorReason#IMAGE_FETCH_ERROR isn't notified when FirebaseInAppMessagingDisplay fails to download the image.
Steps to reproduce:
- Image download could fail for various reasons like network policy etc.
- In such cases, the default display component
FirebaseInAppMessagingDisplaysilently ignores these failures and in app message is ignored. - Application registered listener via
addDisplayErrorListenerisn't notified ofInAppMessagingErrorReason#IMAGE_FETCH_ERROR
Relevant Code:
@Override
public void onError(Exception e) {
Logging.loge("Image download failure ");
if (layoutListener != null) {
bindingWrapper
.getImageView()
.getViewTreeObserver()
.removeGlobalOnLayoutListener(layoutListener);
}
cancelTimers(); // Not strictly necessary.
inAppMessage = null;
callbacks = null;
}
I found a few problems with this issue:
- I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
- This issue does not seem to follow the issue template. Make sure you provide all the required information.
My app wasn't notified by FirebaseInAppMessaging after registering the listener via addDisplayErrorListener when there was an error in displaying in-app messaging.
Is there any update about this issue?
Hi @Ethan1983, apologies for the late response on the issue. Our engineers have address the issue and released the version In-App Messaging version 20.4.1 included in BOM version 33.0.0 for the fix.
With that, I'll be closing this issue now. Let me know if there's any misunderstanding and/or we need to reopen the issue for further investigation. Thanks!