Closed varungupta85 closed 7 years ago
Yes, GCM/FCM stringifies your entire payload, including integers, booleans, arrays, and objects.
A workaround is to send data: {json: JSON.stringify(data)}
and have your Java app parse the JSON string into an object:
http://stackoverflow.com/a/36282596/1123355
Or simply work with the strings to convert them to your desired data type.
I am using this package to send remote notifications to Android devices. I use the
data
field to send the notifications. I am observing that all the fields are received as strings in my app in theGcmListenerService
even if some of the fields that I sent are integers or booleans. Is that expected?