Skip to content

FIAM does not dismiss on back gesture when android:enableOnBackInvokedCallback is set to true #6642

Open
@kk-777-1127

Description

@kk-777-1127
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions