-
-
Notifications
You must be signed in to change notification settings - Fork 473
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 received foreground notification info on OnMessageReceive #52
Comments
Thanks for reporting - I'll have a look into this later |
I've published this fix in |
I tried the same with latest 6.0.1. Still foreground push not working. |
notification.json sent to example project app using |
The problem now has changed with 6.0.1: While the app is in foreground the notification arrives with the info: body: "555" However if the app is background(killed and minimized) and tap it the notification arrives with: collapse_key: "com.bundle.app" From firebase console I do not send the "notification_foreground": "true", att |
If I send a push notification via postman to :
With this body (your notification.json example):
The app force closes and the LogCat shows this error:
One question, do you receive reports if this issue is clossed? Or I have to open new issue? |
I still get emails. |
This is the legacy API - But yes, it shouldn't cause an app crash - I will fix that. |
I've published Note that if the app is not running when the notification message arrives on Android, when you tap the system notification to launch the app, the full notification message payload (e.g. title & body) is not available in the Intent, therefore the plugin cannot forward this on to I've updated the documentation to make this explicitly clear. |
Hello, First of all thanks for your work, pleasure to work with your updated plugin :) You forgot to update the documentation too, because this |
@M0NsTeRRR The documentation is correct:
|
Hi, in the documentation is not explicit, on iOS notifications the
I am trying via Postman with this url but get a 404 error Is the url correct? |
It looks correct, however I have not interacted directly with the v1 FCM API via HTTP, but instead use the google-auth-library in a NodeJS environment to send the messages, as the sendMessage script does in the example project |
about foreground notifications on ios? |
I'm not sure what changed. After two days investing for foreground notification to work. I rolled back to v6.0.0 and the foreground works fine. However, same doesn't work on v6.0.1 as well as on v6.0.2. I have a ionic 4 project w/ angular. EDIT: This is just for android haven't tested out iOS yet. I hope you can help to resolve this. |
@tusharvikky Try building and running the example project and using its FCM API client to send the predefined test messages. Here's screenshots of it when I send |
I have the same problem.. |
@TiGarupa i got the solution! I just added: in my Hope that solves the problem for you too :) |
Thank you @pilz97 this solved for now. |
@dpa99c I have some issue in ionic4 application.
But I can't see any log data in Xcode console. |
@roman8817 I have the exact same issue as you. |
Having the exact same issue on android. Any solution to this |
Note: on tapping a background notification, if your app is not running, only the data section of the notification message payload will be delivered to onMessageReceived. i.e. the notification title, body, etc. will not. Therefore if you need the properties of the notification message itself (e.g. title & body) to be delivered to onMessageReceived, you must duplicate these in the data section, e.g.: { Any idea how can i do this? When my app is in background and when i send a notification from FCM, i get my data like this: background notification { without title and body. How can i get my notification title and body? |
@pilz97 Thanks man, solved here! |
…nt to onMessageReceived(). Ensure message is always sent to onMessageReceived(), regardless if it was tapped. Resolves dpa99c#52.
This did not work for me. What I noticed is, that if we call onMessageReceived() the notification is shown only in background, but when in foreground we have to handle the notification. |
Still doesn't work. Please assist me... |
Let me know how can i assist you. Happy to help.
…On Sun, May 10, 2020, 10:30 PM Yogesh Kumar ***@***.***> wrote:
Still doesn't work. Please assist me...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQY6POHJTD4ABOL5CHWNATRQ3MUPANCNFSM4IGBGVIA>
.
|
The issue still persist in v9.1.1 and platform Android. |
I have the same issue . when i call it in background i do get the notification and on onMessageReceived show me this response
but when i call it forground i dont get the notification and onMessageReceived show me this response :
any solution please |
Hi. |
Buenos días, tambien tengo el mismo problema: |
Hola [adrianva1983], yo no he encontrado solución. Si encuentro algo te digo, si vieses algo no dejes de avisar. Gracias |
Hello, i think this issue occurs in the recent versions of this plugin. |
Hello, It occurs in the recent version of plugin("cordova-plugin-firebasex": "^14.1.0") |
Hello guys It's fine in the background but there is issue in getting foreground notification this.firebaseX.onMessageReceived() |
Hola. Mi version del plugin es 16.1.0. Yo tengo el mismo problema en iOS. En segundo plano funciona correctamente tanto en Android como en iOS. En primer plano en ANdroid va bien pero en iOS me da el message como indefinido. ¿Qué puede pasar? Me estoy volviendo loca |
Ayudame @dpa99c por favorrrrrrr. Gracias |
Mismo problema firebasex 16.3 IOS en primer plano no recibe los mensajes de data porque no se dispara el evento onMessageReceived |
Bug report
No notification received on OnMessageReceived when app is in foreground Mode with a notification sended from Firebase console.
When the app is in background mode the notification arrives to system tray and then if i click to it the info that arrives to OnMessageReceived is this:
No info about title, body.. arrives.
Expected behavior:
Notification info arrives to OnMessageReceived from both modes, foreground and background(tapped)
Environment information
cordova-plugin-firebasex 6.0.0
cordova-plugin-androidx 1.0.2
cordova-plugin-androidx-adapter 1.1.0
Related code:
More info:
I have already tested sending a test notification and a full notification from firebase console. The behaviour is the same.
Thanks for your work
The text was updated successfully, but these errors were encountered: