pranay01
pranay01

Reputation: 305

Can we do web push notifications in chrome without using GCM/FCM?

I am trying to do web push notifications in Chrome without using GCM/FCM. Is it possible? I'm not able to find examples on how to use a different push service.

Upvotes: 8

Views: 12111

Answers (5)

Mr Heelis
Mr Heelis

Reputation: 2546

good grief the advice here is DISGUSTINGLY bad

yes you can do it using https websockets and also a Microsoft project called SignalR which doesn't even "need" browser support, i.e it will work in javascript no matter what

the reason I mention SignalR is that is DEGRADES the mechanic to the bet fit to ensure it works whatever the weather.. tools they use are

  • from old sckoole long polling
  • all the way up to WebSockets under the covers when it's available

(and gracefully fall back to other techniques and technologies when it isn't, while the application code remains the same)

Upvotes: -3

Nanda Kumar
Nanda Kumar

Reputation: 1

I have used Using VAPID for WebPush. This works in Firefox and IE Edge browser. But not mail in Chrome browser. Again in Firefox action seems to be not working. Whereas in IE Edge, notification actions buttons will work

Upvotes: 0

Mathi kumar
Mathi kumar

Reputation: 403

Yes. Using VAPID spec and service worker you can use web push notifications without FCM/GCM. For more information please look into below google docs.

https://developers.google.com/web/fundamentals/engage-and-retain/push-notifications/how-push-works

Upvotes: 6

Marco Castelluccio
Marco Castelluccio

Reputation: 10782

No, it is not possible to use another push service.

In Firefox, you can do it by modifying the dom.push.serverURL preference, but obviously you'd need privileged access to alter the value of the pref.

There are third-party services that you can use to implement push notifications, but they will use the Web Push API under the hood (so Autopush on Firefox, GCM/FCM on Chrome).

Upvotes: 7

Programmer
Programmer

Reputation: 443

It can be done using Service Workers. It's new w3c feature. I've not tried it yet, but you can have a look at it:
https://developers.google.com/web/fundamentals/getting-started/codelabs/push-notifications/

It's not compatible with all browsers. Ref.: http://caniuse.com/#feat=serviceworkers

Upvotes: -2

Related Questions