{"action":"created","issue":{"url":"https://api.github.com/repos/Redth/PushSharp/issues/742","repository_url":"https://api.github.com/repos/Redth/PushSharp","labels_url":"https://api.github.com/repos/Redth/PushSharp/issues/742/labels{/name}","comments_url":"https://api.github.com/repos/Redth/PushSharp/issues/742/comments","events_url":"https://api.github.com/repos/Redth/PushSharp/issues/742/events","html_url":"https://github.com/Redth/PushSharp/issues/742","id":174948980,"number":742,"title":"400 Bad Request in GCM","user":{"login":"elsheimy","id":1776963,"avatar_url":"https://avatars1.githubusercontent.com/u/1776963?v=3","gravatar_id":"","url":"https://api.github.com/users/elsheimy","html_url":"https://github.com/elsheimy","followers_url":"https://api.github.com/users/elsheimy/followers","following_url":"https://api.github.com/users/elsheimy/following{/other_user}","gists_url":"https://api.github.com/users/elsheimy/gists{/gist_id}","starred_url":"https://api.github.com/users/elsheimy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elsheimy/subscriptions","organizations_url":"https://api.github.com/users/elsheimy/orgs","repos_url":"https://api.github.com/users/elsheimy/repos","events_url":"https://api.github.com/users/elsheimy/events{/privacy}","received_events_url":"https://api.github.com/users/elsheimy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-04T13:28:15Z","updated_at":"2017-03-10T12:48:13Z","closed_at":null,"body":"### Version 4.0.10\n\nAlways getting 400 bad request when using:\n\n```\n\n    private static void SendAndroid(ParentMessage[] messages) {\n      var config = new GcmConfiguration(Settings.Default.Gcm_SenderID, Settings.Default.Gcm_Key, null);\n      var broker = new GcmServiceBroker (config);\n\n      broker.OnNotificationFailed += GcmBroker_OnNotificationFailed;\n      broker.OnNotificationSucceeded += GcmBroker_OnNotificationSucceeded;\n\n      // Send Android\n      broker.Start();\n        broker.QueueNotification(new GcmNotification() {\n          RegistrationIds = regIdList,\n          Data = JObject.FromObject(new GcmData(\"The Message\")),\n        });\n\n      broker.Stop();\n    }\n```\n\nI've tried everything here https://github.com/Redth/PushSharp/issues/574 but failed\n"},"comment":{"url":"https://api.github.com/repos/Redth/PushSharp/issues/comments/285660961","html_url":"https://github.com/Redth/PushSharp/issues/742#issuecomment-285660961","issue_url":"https://api.github.com/repos/Redth/PushSharp/issues/742","id":285660961,"user":{"login":"quakernbq","id":16244942,"avatar_url":"https://avatars1.githubusercontent.com/u/16244942?v=3","gravatar_id":"","url":"https://api.github.com/users/quakernbq","html_url":"https://github.com/quakernbq","followers_url":"https://api.github.com/users/quakernbq/followers","following_url":"https://api.github.com/users/quakernbq/following{/other_user}","gists_url":"https://api.github.com/users/quakernbq/gists{/gist_id}","starred_url":"https://api.github.com/users/quakernbq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quakernbq/subscriptions","organizations_url":"https://api.github.com/users/quakernbq/orgs","repos_url":"https://api.github.com/users/quakernbq/repos","events_url":"https://api.github.com/users/quakernbq/events{/privacy}","received_events_url":"https://api.github.com/users/quakernbq/received_events","type":"User","site_admin":false},"created_at":"2017-03-10T12:48:13Z","updated_at":"2017-03-10T12:48:13Z","body":"Fixed. Sample code:\r\n\r\n    var newGcmConfiguration = new GcmConfiguration(\"THE FIREBIRD API KEY.\");\r\n            var Broker = new GcmServiceBroker(newGcmConfiguration);\r\n\r\n            // Wire up events\r\n            Broker.OnNotificationFailed += (notification, exception) =>\r\n            {\r\n               MessageBox.Show(\"Notification Failed!: \"  + exception.InnerExceptions[0].Message);\r\n            };\r\n            Broker.OnNotificationSucceeded += (notification) =>\r\n            {\r\n                MessageBox.Show(\"Notification Sent!\");\r\n            };\r\n\r\n            // Start the broker\r\n            Broker.Start();\r\n\r\n\r\n\r\n            var newGcmNotification = new GcmNotification();\r\n            newGcmNotification.RegistrationIds = new List<string>();\r\n            newGcmNotification.RegistrationIds.Add(\"GCM REGISTERED DEVICE ID(THE MOBILE,TABLET...).USED GCM SERVER HELPER FROM GOOGLE PLAY.\");\r\n            newGcmNotification.Data = JObject.Parse(\"{\\\"alert\\\":\\\"HI ITS ME!!!!!!\\\",\\\"badge\\\":7,\\\"sound\\\":\\\"sound.caf\\\"}\");\r\n            Broker.QueueNotification(newGcmNotification);\r\n\r\n\r\n            // Stop the broker, wait for it to finish   \r\n            Broker.Stop();\r\n\r\n"}}
{"actor":{"display_login":"quakernbq"}}