I am developping a desktop application using C#, which communicates with a server over a WCF Web Service. It is supposed to be a kind of synchronization application. Meaning
PushSharp :A server-side library for sending Push Notifications to clients (the clients are basically mobile devices - but can be custom as well)! You google to get some tutorial on PushSharp use as well.
tolga, you can use winforms with signalR, server side can be asp.net or a standalone windows application..
var webAddr = "https://fcm.googleapis.com/fcm/send";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(webAddr);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Headers.Add("Authorization:key=YOUR_SERVER_KEY");
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = "{\"to\": \"/topics/news\",\"notification\": {\"body\": \"New news added in application!\",\"title\":\"" + Your_Notif_Title+ "\",}}";
streamWriter.Write(json);
streamWriter.Flush();
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
result = streamReader.ReadToEnd();
}
You need to implement a publish and subscribe design. In WCF you could use net-tcp protocol to connect in duplex clients and server.
You could download a quite good implementation on http://www.idesign.net/Downloads/GetDownload/2032
And you will find a good article here.
Regards