Closed ga27 closed 4 years ago
Data notifications fire pushNotificationReceived if the app is in background, but not if fully closed, it’s a known issue https://github.com/ionic-team/capacitor/issues/2401
Notification notifications don’t fire pushNotificationReceived, only the actionPerformed when you tap them, it’s how notification notifications work, they are handled by the OS, not by capacitor.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.
Bug Report
Capacitor Version
npx cap doctor
output:Latest Dependencies:
@capacitor/cli: 1.5.2
@capacitor/core: 1.5.2
@capacitor/android: 1.5.2
@capacitor/ios: 1.5.2
Installed Dependencies:
@capacitor/ios not installed
@capacitor/cli 1.5.1
@capacitor/android 2.0.0-beta.1
@capacitor/core 1.5.1
Affected Platform(s)
Current Behavior
I'm using Push notification from capacitor core in a ionic 5 test app but it don't return the push notification received in background to "notification received" function, i've tried the "notification received action performed" but it dont return the title and the body, and thats what i need. I'm saving it to native storage cause i want to show all the notifications received later.
Expected Behavior
I want to build a notification center page with the notifications received when app is open and closed (or is in background).
Sample Code or Sample Application Repo
home.page.html
home.page.ts
Reproduction Steps
Other Technical Details
npm --version
output: 6.13.7node --version
output:12.16.0pod --version
output (iOS issues only):Other Information