2016-08-04

I created service worker which registered successfully

push permission request for the user is also correctly set

client device is registered for the push

I have the registration id with me. now how can i send push notification to that registration id from my application's backend? What i aim for is that when the approval is done by the manager the message should go to all the people's as desktop notification so that they may be aware and do the furthur work. this is my requirment.

I read about GCM/APNS, but it is not what i aim for. i didn't understand how can i use window. postmessages. how can i do that specific thing of using that registration id and send message to the all the required people who had registered(i.e that server having there ids). My application is asp.net mvc

Update:
Serviceworker.js

Client page

I am displaying desktop notification now, but how can i display notification via registration id or some ip address. Maybe i need to use signal r now.

Show more