You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 7, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 7, 2019. It is now read-only.
I'm thinking this is a bug, but I'm not truly sure since this is my first time dabbling with push notifications.
On Android, while in the foreground, I get this error during the onMessageReceived event:
W/System.err( 2830): org.json.JSONException: No value for message
W/System.err( 2830): at org.json.JSONObject.get(JSONObject.java:389)
W/System.err( 2830): at org.json.JSONObject.getString(JSONObject.java:550)
It contains all my custom key-value pairs, but not the actual message that was sent. For clarity, I am using FCM which I believe is the only option now, but honestly I'm not sure.
I've confirmed that in the background, I do in fact receive a notification in the tray. However, it is still useful to receive the message in the foreground.
Activity
nraboy commentedon Apr 26, 2017
Seems sort of related to this #98, but not really.
nraboy commentedon May 2, 2017
As an update, it seems the problem could be a mismatch between how the Firebase dashboard sends messages, vs what is in their API documentation.
When I send via Postman, everything is fine in the background and foreground. When I use the Firebase dashboard, I get strange results.
EddyVerbruggen commentedon May 2, 2017
Just to back that comment up: I have the same experience with the Firebase plugin and the Firebase dashboard. Using a CURL script works fine though.
AntonDobrev commentedon May 17, 2017
My 2 cents - the message parameter in the callback is populated only if there is data.message key and value, so this is pretty much expected. More information is in the [README] (https://github.com/NativeScript/push-plugin#receive-and-handle-messages-from-fcm-on-android) section for handling messages from FCM.
joey0xx commentedon May 31, 2017
+1 having the same problem