xmppClient.XmppDomain = "gcm.googleapis.com"; xmppClient.Hostname = "fcm-xmpp.googleapis.com"; xmppClient.Port = 5235; xmppClient.ResolveSrvRecords = false; xmppClient.OldStyleSsl = true; xmppClient.Username = senderId; // your sender id xmppClient.Password = serverKey; // your server key xmppClient.AutoRoster = false; xmppClient.AutoPresence = false; xmppClient.Open(); var jsonMessgae = new JObject(new { notification = new { title = "Portugal vs. Denmark", body = "5 to 1" }, message_id = Guid.NewGuid().ToString(), to = testDeviceId }); var msg = new Message { Id = Guid.NewGuid().ToString() }; msg.Add(new Gcm { Value = jsonMessgae.ToString() }); xmppClient.Send(msg);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)