0

I need notifications (which comes from a WCF service callback) in my web application even when the browser is not opened.

The notification source / event I will get from a WCF service callback from WCF service hosted in the network.

I came across the Web Push API and Service Workers concepts which gives me the intended behavior (notify when even browser is closed).

Push API can send the notification to service worker and then it can process. Only service worker can get activated even when browser is not opened for notifications.

I doubt whether I can host WCF service for the service callback even when browser is closed in contrast to service workers.

How to achieve this scenario? notifications which I get at WCF service callback in my webapp -> pass to push api -> service worker -> Notification Display.

SiD
  • 109
  • 1
  • 8
  • Are you referring to FF specific API and workers here? – danish May 03 '18 at 11:43
  • I didn't mention any context with firefox or GCM.. I just need that intended behavior to achieve using any push api provider. – SiD May 03 '18 at 12:09
  • Reason i asked is because desktop notification functionality is browser specific. – danish May 04 '18 at 02:53
  • So do you mean that if I have to achieve the above, I need to use diff browser specific push api libs to support my web app for all browsers? It is so ridiculous. I see some Push API that supports atleast some versions of each browser, for ex this is .net based "web-push-csharp" (https://github.com/web-push-libs/web-push-csharp) lib, go to the end of page for browser support table. I might be wrong also.. please correct me with clear picture of this architecture. – SiD May 04 '18 at 04:25
  • Since you have mentioned you need to show notifications even when browser is closed. you certainly have to rely on browser features. Am I understanding correct? – danish May 04 '18 at 04:28
  • I also see another lib "PushSharp v4.0" (https://github.com/Redth/PushSharp) which supports diff platforms. I feel that is incorrect based on these examples and also from other sources. But please correct me if I'm wrong also. Ultimately I want to achieve the above said scenario. You can tell either in a browser specific way or generic way whichever is correct. – SiD May 04 '18 at 04:34
  • Library you have mentioned is for phones. Are you talking about phone apps or a website? – danish May 04 '18 at 09:15
  • Basically any web app has same behavior in both desktop and mobile. I need the above scenario to work in both. The "web-push-csharp" lib I quoted is nothing specific to desktop or mobile. Or leave all these libs, just let me know of any solution you know to achieve my requirement. – SiD May 04 '18 at 10:04
  • @danish Kindly provide suggestions or solution for my scenario – SiD May 07 '18 at 12:20

0 Answers0