Now that I've tested with the pushNotificationReceived message, this
update delivers the payload data;
# data element of notification
put "New updates available" into tDataA["title"]
put "There are 3 new updates..." into tDataA["body"]
put tDataA["body"] into tDataA["alert"]
put 3 into tDataA["badge"]
put "default" into tDataA["sound"]
put "Payload data" into tDataA["payload"]
# build notification
put tDataA into tNotificationA["data"]
put tTokenA into tNotificationA["registration_ids"]
put "SplashCloud" into tNotificationA["collapse_key"]
jsonEncode tNotificationA, tNotification
# headers
put "Content-Type: application/json" & LF into tHeaders
put "Authorization: key=<Your Key>" & LF after tHeaders
set the HTTPHeaders to tHeaders
# had a couple of errors that were resolved by setting/resetting
this flag :/
#libUrlSetSSLVerification true
# send the notification
post tNotification to url "https://android.googleapis.com/gcm/send"
put it into tResponse
put the result into tResult
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode