-
Notifications
You must be signed in to change notification settings - Fork 141
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
Tapping on push notification restarts backgrounded app on Android #414
Comments
@karim-cardeo What is the launch mode of your MainActivity in the manifest? Try to use the launchMode as "singleTask" or "singleInstance". |
I can reproduce the issue - so whenever push notification is clicked, Flutter app is restarted, if it was in the background. Everything is set up correctly (including Manifest). Can you please check how to fix that? Looks like the Intent which is sent through the notification is restarting the app. |
What is the launch mode of your MainActivity in the manifest? |
Tried both with singleTask and singleInstance, all other features are working well, so everything's correctly configured. |
I will test it at my end. But I suggest you to contact with the Intercom support as it seems to be an issue with SDK itself. |
Thanks @vasa137 @deepak786 for testing the different launch modes, I have had to disable Intercom pushes for Android as a mitigation for this issue and so I was not able to test further. It would be good to also test this in a pure Android app with the Intercom SDK directly to see if the issue is replicable there - I will try this when I have some time. If it's replicable, we can then contact Intercom support. I have found that they are quite technical so no doubt they'd be able to help out with this. |
We just noticed this same issue, anyone found a workaround for this? In our case the app seems to restart in continuous loop causing eventually ANR. |
Anyone had time to check if this reproduces with native app or is it happening only with Flutter? |
@nikorehnback did you try with different launch modes as explained here #414 (comment) |
Does your MainActivity extends |
I use FlutterFragmentActivity, and have problems |
Using FlutterFragmentActivity as well and did try with different launch modes too but didn't see any difference. Haven't had time unfortunately to create minimal sample to reproduce the bug we see. |
I will test the issue at my end. Meanwhile could you please report the issue to Intercom support directly as it seems to be an issue in native SDK. |
I have the exact same issue with my App. Launch mode of the |
Hi folks,
I have recently found an issue which occurs when tapping on a push notification sent by Intercom on Android if the app is in the background.
Steps to replicate:
Given I have an Android Flutter app with the intercom_flutter package installed and correctly setup,
And I have launched the app and put it in the background,
When I receive a push notification from Intercom,
And I tap on the push notification,
Then I am routed to the Intercom messenger,
And the app is restarted.
The expected result should instead be that the app is brought back from the background without restarting.
I have been able to replicate this issue on a brand new Flutter project that uses the latest version of Flutter (3.19.2) and of the intercom_flutter package (8.1.1).
Below is the code of the only screen in my test project (sensitive data redacted):
And here is the
pubspec.yaml
file which shows all of the dependencies on this project:Finally, I have attached below a video of the issue captured on my Android device (the blue screen that appears is my mock splash screen, there to indicate the app is restarting):
intercom-bug.mov
The text was updated successfully, but these errors were encountered: