Send simple notification to Android
Send simple notification to Android public string SendNotification( string DeviceToken, string message) { var value = message; WebRequest tRequest; tRequest = WebRequest .Create( "https://android.googleapis.com/gcm/send" ); tRequest.Method = "post" ; tRequest.ContentType = " application/x-www-form-urlencoded;charset=UTF-8" ; tRequest.Headers.Add( string .Format( "Authorization: key={0}" , Common .GoogleAppID)); tRequest.Headers.Add( string .Format( "Sender: id={0}" , Common .SENDER_ID)); string postData = "collapse_key=score_update&time_to_live=108&delay_while_idle=0&data.message=" + value + "&data.time=" + System. DateTime .Now.ToString() + "®istration_id=" + DeviceToken + "" ; Console .WriteLine(postData);