Hey i have been developing a windows 8 desktop app using XAML and C#. I have to implement push notification functionality in it. But i cannot keep my database on cloud due to some security reasons. Is there any other solution so that i can keep my database inside my network only but still can write mobile service to implement push notifications. Any link or suggestion is welcome.
Typically in push notification scenarios there are three pieces:
App.
Cloud Service.
Push Notification Service
Where the app registers for notifications, passes the registration to the cloud service which can then use the PNS to send notifications.
However the Cloud Service component doesn't need to be in "the cloud" it can be anywhere the client app can connect to and send the registration. It's just a web service hosted somewhere, be in a cloud platform, your own hosting etc.
There is a company that provides this service for you for free called Notice Software. They provide push within apps at not cost and handle the cloud interaction etc. I think the product site is NativePush.com....also used UrbanAirship but not sure I want to pay that much! Frees always best :)
Related
I'm attempting to build a live support chat application in C# using a WCF microservice and after endless searches I still can't find the answer, hopefully someone here can point me in the right direction.
My problem is that rather than a typical chat room a where users broadcast messages to all connected clients, I need the application to be more like a Live Support app found on websites such as Amazon or eBay.
Ideally multiple customer support agents will have a pre installed WinForms chat application on their machines, when a customer opens a chat window (aspx page) it will connect to a server/service and the server/service will then call all connected customer support agents until one answers. At this point the customer and agent will be connected in a private chat window.
Could somebody please give me some insight or ideas on how to do this?
Thanks,
Owen
You can use ASP.NET SignalR which is a library for ASP.NET developers that makes developing real-time web functionality easy. SignalR allows bi-directional communication between server and client. Servers can now push content to connected clients instantly as it becomes available.
Here you can find more details and many tutorials about SignalR.
The first resoult in google
A WCF-WPF Chat Application
Video tutorial
WCF Chat Application
ASP.NET Chatting using WCF Services and JSon
A simple peer to peer chat application using WCF netPeerTcpBinding
usefull lectures
HTML 5 Web Sockets
Always first ask google, above you have few ready to use projects that you can copy to your solution
EDIT:
Also as tip I can recommend bi-directional message queues at application level, then make index for messages with session and users identifier. Next step would be WCF with pop and push logic based on wait objects. At low cost you will need to lock queue. WCF will do heavy job. Also problems can occure inside app with proxy management and message sending so dedicated proxy for chat would be great and safest idea. And read about Duplex Services that can be usefull here DUPLEX SERVICE
These are my findings, not checked though:
Live Support Chat using SignalR
Parle
A tutorial from ASP.NET team:
Real-time chat with SignalR 2
The first one looks very early development stage, Parle is somewhat more promising.
Anyway, since I continue my research on the topic maybe I'd need to augment my answer. Until then the links could be a good starting point.
I have read this:
http://msdn.microsoft.com/library/windows/apps/ff402558(v=vs.105).aspx
This is the API documentation of the push notification service I want to get pushes from: https://developers.podio.com/examples/push
How do I go about implementing push notifications with Podio if they do not support MPNS. It looks like (from the msdn documentation) that they will have to send the notifications to Microsoft Push Notification Service at stage 5.
Is there a way around this stage? Can I communicate directly with Podios PNS somehow? Why should Podio who are protected by Citrix have to send sensitive data through Microsoft's service when they have a service workflow of their own? I'm struggling to understand this!
Related documentation:
http://forums.wpcentral.com/windows-phone-8-guides-how-tos/234780-how-push-notifications-work-why-sometimes-they-might-not.html
EDIT
If I set up a service of my own that Microsoft's push notification service interacts with... I can then make interactions on behalf of Podio... Is this normal practice?... I'm assuming that the lag of double dosing requests is going to be pretty useless for something like a messaging application.
I noticed that Android seems to also now have a middle man service... But I assume that having the choice means large companies who do not want to make a handshake with a third party company do not have to?
http://developer.android.com/google/gcm/gcm.html
I have an asmx web service that hosts various data, and now I want to send live tile updates from the web service. I have understood that push notifications can be sent from cloud to WSN, but I haven't really found any good examples for custom web services. Any ideas how this can be implemented?
In addition to the great references already provided I wanted to speak specifically to the use of "custom web services." In a greenfield push notification scenario, I'd strongly recommend looking at Windows Azure Mobile Services (WAMS) which abstracts much of the underlying REST/HTTP/OAuth choreography AND provides the benefit that it's backed by the Windows Azure cloud architecture (pay for what you use, failover, data backup etc.)
Given you already have a service, you may or may not decide the benefits of WAMS are worth the code changes/migration it would require. Should you want to continue with the service you have, you will end up doing a bit of grunt work yourself - using OAuth to authenticate with WNS, etc. It's not rocket surgery, but it's tedious :) The Windows Azure Toolkit for Windows 8 did include a recipe for doing all that, but it's now deprecated by Windows Azure Mobile service.
I tackled the subject of doing the push notification flow from "scratch" leveraging ASP.NET (I used WebAPI but ASMX could be used as well) in Windows Azure Web Sites (which you might consider as a host for your service). There's a bit of ancillary work involved as you'll need somewhere to store the channel IDs for the notifications (I used the free MySQL instance) and you'll need to use OAuth to communicate to the WNS (I used a helper class posted as a Gist), but I cover all that end-to-end in a three-part blog series
Your server infrastructure (Windows vs. Linux) and the type of application (asmx vs. aspx) don't really have any impact on how you send the notifications. Notifications are sent as an HTTP POST from your server to the MPNS server with specially formatted XML data.
Here are two really good references to get you started:
Push Notification Overview
http://msdn.microsoft.com/en-us/library/windows/apps/hh913756.aspx
Sending Push Notifications
http://msdn.microsoft.com/en-us/library/windows/apps/xaml/Hh868244(v=win.10).aspx
Dev support, design support and more awesome goodness on the way: http://bit.ly/winappsupport
This book might be helpful. Go to Chapter 13.
http://blogs.msdn.com/b/microsoft_press/archive/2012/10/29/free-ebook-programming-windows-8-apps-with-html-css-and-javascript.aspx
I'm trying to make a prototype of my next application, and before I can start, I wanted to know your feedback about it.
The user will be able to control his home remotely using a mobile phone.
First, the mobile phone will send a request to the cloud plateforme wich is going to do some authentifications (username, ip-address, password) and send the user request to his office laptop (home storing a Web Service WCF) and this one will ask the CM15 to do the rest of the job (switch on/off a light, ...)
And just wanted to know if this thing seems correct to you.
You need to specify if you are using a polling or push model for cloud to home communications.
Polling is easier, and would handle home network disconnection better but you could also use Azure Service Bus to provide a way to call down from the cloud to the laptop as well.
Our desktop application require to be updated directly when a mobile employee sends any message from his/her windows phone 7 mobile.
Currently our requirement is that send a message from our desktop application to a Windows Phone 7.5 which we are able to achive easily using PUSH Notifications, Now when the user takes some action against the sent message the windows phone app calls the WCF service and pass the message to that WCF which receives the message and puts into the database and application reads it later and this is where problem lies. Because our WCF is putting that message into database our application is polling it every 5 second and if any replies received from any of our drivers then it is updating the UI.
What we want to achieve is when we receive any reply our desktop applicaton should be notified automatically and udpates the UI and then put it into the database.
So please share your experience on this issue.
Thanks
Why not update the WCF service to notify any registered "listeners" (i.e. running instances of your client app) that the database has been updated with new information?
You could do this by having your service expose a service that can be called by clients wanting to register for some/all event types. The client app(s) host a service implementing a callback contract that the service can call when the registered events are raised.
There's a good MSDN article one-way, callback and pub-sub messaging with WCF: http://msdn.microsoft.com/en-us/magazine/cc163537.aspx.
Be sure to keep track of and throttle how many events your client app is receiving per second - the last thing you want to have happen is for 100 client apps to all hit the server 50 times each if 50 events are raised sumultaneously!
Richard's solution is probably more proper, since it describes using nicely packaged WCF APIs that will do a lot for you. Another way could be to implement long-polling yourself. You could then also update your Windows Phone clients when they need to receive an immediate update. I wrote an article on that some time ago which you can find if you google long polling on Windows Phone.