Answered by:
Any real time communication solutions for Enterprise Store App?
Question
-
We create an app for an Enterprise network using Javascript, so far so good. But now we got an very critical requirement says that the app can receive notifications from a remote server at any time, no matter suppended or not.
I search the MSDN docs and find too possible solutions: ControlChannelTrigger and WNS.
WNS needs internet access which is impossible for a enterprise envrionment, and ControlChannelTrigger makes me a little confused too.
Based on my understanding, I can create a background-task and use that Trigger to do real-time communication using C# along with my Main app written using Javascript. Then I can deploy them as a whole part, am I right?
Return to the source, learn the way!
Monday, October 14, 2013 9:59 AM
Answers
-
Hi FengChen,
Yes, you have it right. A ControlChannelTrigger is probably what you want here. Your Control Channel background task will require a C# component, but the foreground task can still be JavaScript and they will be deployed in the same package. While your foreground app is suspended a background task can keep a connection open to your server to receive notifications. This will allow you to implement your own push notification system.
Take a look at the Introduction to Background Tasks and Background Networking whitepapers. There are several samples demonstrating using a ControlChannelTrigger with various networking types.
As you say, WNS won't work in your environment. WNS requires that the app be published in the store, not just side-loaded.
--Rob
- Proposed as answer by Dave SmitsMVP Monday, October 14, 2013 6:09 PM
- Marked as answer by Jamles HezModerator Friday, October 18, 2013 5:27 AM
Monday, October 14, 2013 2:13 PMModerator
All replies
-
Hi FengChen,
Yes, you have it right. A ControlChannelTrigger is probably what you want here. Your Control Channel background task will require a C# component, but the foreground task can still be JavaScript and they will be deployed in the same package. While your foreground app is suspended a background task can keep a connection open to your server to receive notifications. This will allow you to implement your own push notification system.
Take a look at the Introduction to Background Tasks and Background Networking whitepapers. There are several samples demonstrating using a ControlChannelTrigger with various networking types.
As you say, WNS won't work in your environment. WNS requires that the app be published in the store, not just side-loaded.
--Rob
- Proposed as answer by Dave SmitsMVP Monday, October 14, 2013 6:09 PM
- Marked as answer by Jamles HezModerator Friday, October 18, 2013 5:27 AM
Monday, October 14, 2013 2:13 PMModerator -
Thanks for your detailed and timely answer. I'll try it out ASAP.
Return to the source, learn the way!
Monday, October 14, 2013 11:44 PM