'http://developer.android.com/google/gcm/http.html
Dim DataToSend
DataToSend = DataToSend & "registration_id=" & regids
DataToSend = DataToSend & "&collapse_key=location"
DataToSend = DataToSend & "&data.location=" & metaData
Dim key
key = "AdisfbsisP5MwE389fjnsidsslpx10fm2siusbi8bwc" 'Generated server key for the application
url = "https://android.googleapis.com/gcm/send"
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "POST", url, false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded;charset=UTF-8"
'Public API Server Key
xmlhttp.setRequestHeader "Authorization", "key=" & key
xmlhttp.send DataToSend
returnString = xmlhttp.responseText
set xmlhttp = nothing
sendToGCM = returnString
end function
No comments:
Post a Comment