Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Restarts When Tapping LiveChat Notifications #23

Open
dhiyaaulauliyaa opened this issue Jan 16, 2025 · 1 comment
Open

App Restarts When Tapping LiveChat Notifications #23

dhiyaaulauliyaa opened this issue Jan 16, 2025 · 1 comment

Comments

@dhiyaaulauliyaa
Copy link

Description

When users tap on LiveChat notifications, the app immediately restarts. This behavior is specific to LiveChat notifications only - all other push notifications work as expected without triggering an app restart.

Environment

  • Package Version: infobip_mobilemessaging: 7.2.1
  • Flutter Version: 3.24.4
  • Device/OS tested on: iOS & Android

Current Implementation

InfobipMobilemessaging.on(
    LibraryEvent.notificationTapped,
    (infobip_message.Message event) async {
        // handle livechat notification
        if (event.chat ?? false) {
          // Handle to open livechat page here
         ...
         ...
         ...
          return;
        }
    },
);

Steps to Reproduce

  1. Set up LiveChat integration
  2. Send a message as an agent to trigger a notification
  3. While app is in foreground/background, tap on the received notification
  4. Observe app restart instead of normal resume

Expected Behavior

App should resume normal operation when tapping the notification, without restarting.

Additional Context

  • This issue only occurs with LiveChat notifications
  • Regular push notifications work correctly without causing app restart

Questions

  • Is this a known issue/expected behavior?
  • What is the recommended implementation to prevent the app restart?
  • Are there any relevant documentation or code samples available?
@fortesdev
Copy link
Contributor

Hi @dhiyaaulauliyaa,

we need a common ground to understand this issue. Within the SDK there is an example application you can use to try to reproduce the problem. Please, define your application code, proper bundleId etc. and let us know if the app restarts when tapping a notification (there is a LibraryEvent.notificationTapped handling already defined in homepage.dart)

For context, I just tried on iOS with latest version and cannot reproduce: app is invoked as it should, and chat remains in screen, both with app in background and foreground. Perhaps there is something different between the way you present the screens and the example app.

Abouy your questions and data provided:
Does "other push notifications" mean other provider's notifications, or other non chat notifications from Infobip?
This is not an known issue and there is nothing special that would be needed - as you hopefully see in the example app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants