-
-
Notifications
You must be signed in to change notification settings - Fork 469
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
Not getting notifications alert on device #165
Comments
I have tried using the https://github.com/dpa99c/cordova-plugin-firebasex-test by changing the package ID and google-services.json file. I sent notification using the firebase console and as per the test app logs, it show 'Notification message received'. |
Are you testing with the app in the foreground (displayed), background or not running? |
This was an issue for both foreground as well as background. To be more clear about this issue |
This plugin has changed significantly from Note that if you send notification messages from the Firebase console, this key will not be present. The current plugin version has been regression tested using the example project on both iOS and Android and notifications are received and displayed when the app is in the foreground/background/not running. I will regression test the delivery of the data payload from a system notification arriving when the app is background/not running when I get a moment to confirm this has not been broken in a recent version. |
I have added a few changes to the notification messages as per the pre-defined . I am getting the alert for the notifications now for both android and ios. But the data sent in the notification payload is still not working. |
iOS or Android or both? |
Sorry for the delay in response. Yes in both ios as well as android. I am running in foreground and not running, running in background (all places). |
I will regression test the data payload in all situations when I have some time |
I have a similar issue, but only with notifications coming from an external service (Intercom). At the other hand, when I try to send a message from Intercom to that device, I can't see the notification in the device but adb logcat shows:
One more hint is that if I use the message type 'android_data_notification_custom_channel' from the firebasex-test script, the situation is the same that I have with Intercom. Could it be possible that messages with channel=null are being dismissed by the firebasex plugin? I tested with a clean cordova app just with the Intercom plugin, and it works. If I install firebasex (and change the intercom option to fcm-without-build) it stops working. Any idea on how can I workaround this? Thanks! |
what is the payload you are sending in? |
The thing is that I don't control the payload of the notification. Intercom does :( |
hmm, you might have some trouble then... this requires some custom tags to do exactly what you want it to do. I will let @dpa99c tell you for sure, but i think you might have some troubles |
I'm talking to Intercom's engineering team, and I'll ask them about the payload. They are probably going to defend that if I uninstall cordova-plugin-firebasex, the notification is shown. Do you have any insight about why is that happening? Thanks! |
Some light to the issue: The problem is that Intercom is sending a Data message with Is the FirebasePlugin payload specification something standard? I'm just trying to understand if Intercom should be sending the messages in your format, or if every app manage them in his way. I'm wondering if is there any way to propagate the data message to the rest of plugins in order to be handled by them, or only one plugin can handle data messages. Any help? Thanks. |
there is no specification for the data payload of an FCM data message - the payload is entirely arbitrary. By default Firebase does not display notifications for data messages, hence this plugin implements a mechanism to allow that to happen and it's bespoke to this plugin. However, it assumes that you have control over the FCM message structure being sent to the app, which in this case you don't.
This plugin implements a mechanism (currently for Android only) by which another plugin can declare itself a "handler" for a specific message and so have this plugin ignore that message. |
@sun34133 BTW I haven't forgotten your reason for opening this issue in the first place - I still have regression testing payload delivery in all scenarios/platforms on my TODO list. Hopefully I can get around to that soon. |
That makes sense. I'll try implement the handler in the other plugin and see how it goes. Thanks! |
@dpa99c When sending a data message with notification (using the android_data_notification template) and the app is not running, I can see in adb logcat:
It works fine when the app is running in background. It seems that the method works with the context, but there is no context when is not running. Any idea? |
One more issue, now on iOS. Does this happen also to you guys? Thanks. |
@albertopq you need to include the |
@sun34133 I have regression test delivery of the data payload using the example project in all situations (foreground/background/not running) on iOS (using iPhone 7/iOS 13.2) and Android (using Android 10 on Pixel 2 XL) and found the data payload to be delivered in all cases. If you are able to reproduce different results using the example project, please provide full details of the scenario, OS version, test device, native console log, etc. |
…xt when app is not running and therefore cordovaActivity doesn't exist. Resolves #165.
Hi @dpa99c Sorry for the delay response. I was away due to some personal issues. I will check with the example projects again with different scenarios and devices etc and will update you. I am getting below issue with the latest version 7.0.0
I will check with older version 6.1.0 as well. |
Hello,
I am getting issue with the android notification. We are not getting an alert or indication of a notification anywhere on the mobile's interface.
Currently I am checking on an android device only. Will check it for ios device after this.
Cordova version: 9.0.0 ([email protected])
[email protected]
[email protected]
Other plugins used as following:
br.com.brunogrossi.MediaScannerPlugin 0.1.3 "Media Scanner Plugin"
com.dawsonloudon.videoplayer 1.0.0 "VideoPlayer"
cordova-custom-config 5.1.0 "cordova-custom-config"
cordova-open-native-settings 1.5.2 "Native settings"
cordova-plugin-android-permissions 1.0.0 "Permissions"
cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx"
cordova-plugin-androidx-adapter 1.1.0 "cordova-plugin-androidx-adapter"
cordova-plugin-certificates 0.6.4 "Certificate Plugin"
cordova-plugin-device 2.0.3-dev "Device"
cordova-plugin-dialogs 2.0.2 "Notification"
cordova-plugin-file 6.0.2-dev "File"
cordova-plugin-file-opener2 2.2.0 "File Opener2"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-firebasex 6.1.0 "Google Firebase Plugin"
cordova-plugin-geolocation 4.0.2-dev "Geolocation"
cordova-plugin-google-analytics 0.8.1 "Google Universal Analytics Plugin"
cordova-plugin-inappbrowser 1.2.1 "InAppBrowser"
cordova-plugin-network-information 2.0.2 "Network Information"
cordova-plugin-splashscreen 5.0.3 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
I have used cordova-plugin-androidx and cordova-plugin-androidx-adapter along with the cordova-plugin-firebasex.
The text was updated successfully, but these errors were encountered: