i am using @capacitor/push-notifications and issues are like this -
- if app is open and notification comes tapping on it not working and if app is minimized then tapping and redirecting both works fine.
- if app is killed or closed then notification comes then tapping on it not redirecting to destination page it always redirected to home page
I was able to let it work only in iOS, in Android if the app is killed the app redirects me aleways to home page
Can you share your code? I have not noticed any issues in my app.
For push notifications when the app is in the foreground, I create a local notification. See this discussion - Push Notifications click_action called before notification actually clicked - #11 by twestrick.
I register all the listeners on app boot (in Vue, in the
main.ts file) before the app is mounted. I first call
removeAllListeners and then re-register them. When I was setting up push notifications up over a year ago, if I didn’t remove the listeners first, each time I registered them, they would start to duplicate and cause issues.