Search code examples
androidgoogle-cloud-messagingsmack

how to send integers, bools in a bundle via GCM.send


I see that when bundles are filled with non string data types and sent via GCM, the Smack library receives only string data types. How to send/receive non string data types via GCM


Solution

  • Just convert your payload to JSON and send it as a String. Then you can parse the JSON later on server/client side with desired datatypes.