Open simonklinge opened 3 years ago
I think getInitialPayload() gets triggered when the app is opened by clicking on the notification from killed state, not background state.
Killed state on ios means, that the app is not running in the background.
The getInitialPushPayload only load if the app has a notification that was erased from notification center.
Try whit
this.fcm.getInitialPushPayload().then(data => { if(data != null) { // show data }}) .catch(e => console.log('ErrorPayload', e))
Hello,
I'm having the same problem, the app is killed -> getInitialPushPayload data null I'm using the last version of plugin + ionic 5 @RidClick I used that but same, when I click the notification it opens the application but still having null
Update
->setNotification(AndroidNotification::create()->setClickAction('FCM_PLUGIN_ACTIVITY'))
--> this line solved the problem (using laravel)
Same problem here, but only on Android.. On iOS, getInitialPushPayload() returns with an object. On Android, it returns only with null.
Is there any solution for this? If not then which version is stable to use? @andrehtissot
Is there any update on this issue?
Thanks to @GroupeBEL at https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated/issues/223#issuecomment-785798244 - this solution worked for me as well.
Stack: Android app running Vue (Quasar framework), notifications sent via npm's firebase-admin package
Is there any solution for this bug? I send message from the Firebase console, and the initialPayload is null (I tried to add "click_action":"FCM_PLUGIN_ACTIVITY" as custom data, but not helped..)
I am experiencing this problem on Android too
Describe the bug After tapping the notification the app will come to foreground but the InitialPayload is not set. While debugging the android project it seems that the FCMPluginActivity is never created. (onCreate is never called)
Also on iOS getInitialPayload data is always null. However, on iOS the onNotification event fires, so it is no problem here.
Environment Plain cordova. No ionic.
Payload our incoming payload looks like this ('onNotification' result):
so the click action is set
Package.json of the cordova project I created a new project to replicate this issue:
config.xml of the cordova project
Any help is much appreciated :)