-
Notifications
You must be signed in to change notification settings - Fork 164
Description
Problem
When Intercom Messenger is displayed via Intercom.instance.displayMessenger(), pressing the Android back button navigates within Intercom's UI (e.g., conversation → inbox) instead of closing Intercom and returning to the app. Users must press back multiple times to exit Intercom.
Desired behavior: Single back button press should close Intercom Messenger and return to the app.
Environment
- Package:
intercom_flutterversion9.4.21 - Platform: Android
Technical Details
Intercom's SDK creates IntercomRootActivity when displaying the messenger. When this Activity is on top:
-
Flutter widgets are not in the foreground, so
PopScope/WillPopScopecannot intercept back button -
Our
MainActivity.onBackPressed()is not called because Android routes back presses to the topmost Activity (IntercomRootActivity) -
We cannot override
IntercomRootActivity's back button handling since it's part of the SDK -
Is there a way to customize back button behavior when Intercom Messenger is displayed?
32 Could this be added as a feature (e.g., configuration option to close messenger on back press)?
Additional Context
This affects user experience in our eSIM management app. Users expect a single back press to exit Intercom and return to their dashboard, but currently must press back multiple times.
Related
- This appears to be an architectural limitation of how Intercom's SDK manages Activities on Android
- Similar issue may exist on iOS (not tested)