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

OneSignal.Notifications.addClickListener does not fire on push notification tap when app is killed (iOS) #723

Closed
1 task done
ObserverMoment opened this issue Aug 31, 2023 · 20 comments

Comments

@ObserverMoment
Copy link

ObserverMoment commented Aug 31, 2023

How can we help?

Hi,

Firstly, should it fire when the app boots up when triggered by a push notification click? Or is this listener only triggered when app is open or in background?

If it is not possible to fire this on app load...

How is it possible to deeplink from a push notification into a Flutter app that is completely closed (not open and not in background)?

I am using this package to catch deeplinks as they arrive: https://pub.dev/packages/app_links.

Everything is working as expected when I open a link (either uni link or custom schema format) in all app states (open, background and killed). However, when I tap a push notification the initial link is only present when the app is open or in background, not when closed.

On android I don't seem to have this issue, only on iOS. I am wondering if there is some iOS specific issue with cold starts and push notifications? Or if there is some other way to capture the launch url on app boot that I am missing?

Thanks,

Rich

Code of Conduct

  • I agree to follow this project's Code of Conduct
@gampixi
Copy link

gampixi commented Sep 1, 2023

Hi, I've also reported this issue via support. I was also having an issue with notification URLs not opening when the app is terminated. Yesterday I was told that they've been able to reproduce the issue on their end, so hopefully we can expect some sort of fix soon 👍

@ObserverMoment
Copy link
Author

@gampixi , ok thanks, this is good news! Fingers crossed for a fix soon.

@MaximilianFlechtner
Copy link

Is there a workaround?

@cgmleadtech
Copy link

Is there any news regarding this?
Even by downgrading to 3.5 does not work

@alegos27
Copy link

We have the same problem: when app is closed the addClickListener callback is not fired on notification tap. After some tests we noticed that the first notification does not work if it is opened immediately or disappears shortly after. In case it disappears if you send a notification after the second works.

@hagen00
Copy link

hagen00 commented Sep 21, 2023

Same issue for me.

OneSignal.Notifications.addClickListener((OSNotificationClickEvent event) {

Only seems to work on iOS if the app is open in the background. Not when closed completely. Using onesignal_flutter: ^5.0.1

@alegos27
Copy link

Any news about it? We saw 5.0.2 version of iOS SDK but the Flutter SDK has no updates and the bug still remain.

@emawby
Copy link
Contributor

emawby commented Sep 27, 2023

Fixed in #752 and will be in the next release

@nan-li
Copy link
Contributor

nan-li commented Nov 2, 2023

Hey all, since this was released in v5.0.2 of this SDK, I will close this issue.
Please reach out if you are still experiencing any problems.

@nan-li nan-li closed this as completed Nov 2, 2023
@burakcbdn
Copy link

burakcbdn commented Apr 4, 2024

Issue still exists on version 5.1.2, click listener triggers when app is on the background but not working when app is killed.

UPDATE: Same issue exists on android,too.

@jxr202
Copy link

jxr202 commented Apr 11, 2024

我这边在使用 5.x.x 的时候,也遇到了该问题。Android 设备

@andy7076
Copy link

Issue still exists on version 5.2.0, click listener triggers when app is on the background but not working when app is killed.

UPDATE: Same issue exists on android,too.

@abdulmominsakib
Copy link

version 5.2.1, the issue still exists @nan-li

@rezwanahmedsami
Copy link

onesignal_flutter: ^5.1.2 in this version still same issue

@nandaprasesoft98
Copy link

in onesignal_flutter: ^5.2.2, still same issue
in original firebase, using FirebaseMessaging.onMessageOpenedApp.listen, if in background mode and clicking notification, the listener callback is called. But if in one signal (OneSignal.Notifications.addClickListener), the listener callback is not called

@OneSignal

@vdiaza
Copy link

vdiaza commented Aug 29, 2024

I am experiecing same issue with version 5.2.3, anyone has found a solution?

@BruSD
Copy link

BruSD commented Aug 29, 2024

@vdiaza
Yup, we finally found the solution for this issue. Move to Firebase messaging

@fimpact-nicole
Copy link

fimpact-nicole commented Oct 11, 2024

I'm experiencing same issue with version 5.2.5 and 5.2.6.
For me, the callback of addClickListener() works well when the app is in the background or foreground state but it does not work when the app is killed.

@midhun93
Copy link

I checked on the 5.2.6 but when the app is open from killed or coldstart stage the addClickListener() is not working. Any solution?

@midhuns1
Copy link

@nan-li When the app is open from the killed state the addclicklistener is not tiggering. Do you have any solution on this in flutter? I need to navigate to custom page when the notification is clicking based on the information from the additional data.

I am stuck on this for releasing the important feature of build

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