currently all notifications to gcm servers are sending with 'data' key. for those who don't want to use this method handeling 'data' key is confusing. that is, if you don't provide value for $data variable in the send method json encoded string that will be send to the gcm servers is somthing like:
{
"notification" : {
"title" : "title of notification",
"body" : "content of notification"
},
"data": null,
"registration_ids" : [
"registration_ids goes here"
]
}
or:
{
"notification" : {
"title" : "title of notification",
"body" : "content of notification"
},
"data": [],
"registration_ids" : [
"registration_ids goes here"
]
}
or
{
"notification" : {
"title" : "title of notification",
"body" : "content of notification"
},
"data": {},
"registration_ids" : [
"registration_ids goes here"
]
}
and i don't know if this values are acceptable with gcm.