Open
Description
- Android Studio version: Android Studio Meerkat | 2024.3.1 Canary
- Firebase Component: InAppMessaging
- Component version: Bom33.7.0
Expected behavior:
• The FIAM message should be dismissed when the back gesture is performed.
Observed behavior:
• The FIAM message is not dismissed when the back gesture is performed.
Steps to reproduce:
1. Enable android:enableOnBackInvokedCallback in your app’s AndroidManifest.xml.
2. Display a Firebase In-App Messaging (FIAM) message.
3. Attempt to dismiss the FIAM message using the back gesture.
Relevant Code:
It seems the issue may be related to the BackButtonHandler implementation in the Firebase In-App Messaging SDK. Specifically, dispatchKeyEvent in BackButtonHandler might not be invoked when android:enableOnBackInvokedCallback is set to true, as the back gesture bypasses the traditional KeyEvent.KEYCODE_BACK handling.