NotificationResponseReceivedListener not called when app is killed
Problem
Summary I ran into problems while developing an app that has to respond to push notifications. I based this app on the expo notification snack that is found in the documentation. When trying out my app, the expo notification service works fine when an app is in the foreground or background, but does not trigger when the app is killed. I use the addnotificationresponsereceivedlistenerlistener method to handle notifications when the app is killed. I found a lot of issues about this problem that have already been closed. Unfortunately, the solutions/pull request in these issues don't solve the problem on my system. I therefore think this might be a bug that was introduced in version 42 of the expo SDK. Related issues - https://forums.expo.dev/t/push-notification-doesnt-open-specific-screen-when-app-is-killed-works-only-in-foreground-and-background/53890/5 - https://github.com/expo/expo/issues/13333 - https://github.com/expo/expo/issues/12954 - https://github.com/expo/expo/issues/12228 - https://github.com/expo/expo/issues/11933 - https://github.com/expo/expo/issues/11470 - https://github.com/expo/expo/issues/11340 - https://github.com/expo/expo/issues/10621 - https://github.com/expo/expo/issues/9968 - https://github.com/expo/expo/issues/6943 Managed or bare workflow? If you have `ios/` or `android/` directories in your project, the answer is bare! managed What platform(s) does this occur on? Android SDK Version (managed workflow only) 42.0.1 Environment [code bloc
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: NotificationResponseReceivedListener not called when app is killed
@rickstaa @cruzach I am also experiencing this odd behavior on sdk 42, except I am in the bare workflow. To be more clear only see addNotificationResponseReceivedListener triggered when the app is in the foreground or backgrounded state but not the killed state.
Trust Score
4 verifications
- 1
@rickstaa @cruzach I am also experiencing this odd behavior on sdk 42, except
@rickstaa @cruzach I am also experiencing this odd behavior on sdk 42, except I am in the bare workflow. To be more clear only see addNotificationResponseReceivedListener triggered when the app is in the foreground or backgrounded state but not the killed state.
Validation
Resolved in expo/expo GitHub issue #14078. Community reactions: 6 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep