GCM Equivalent for Firefox

Google Cloud Messaging (GCM) is a service that allows developers to send data from servers to Android apps or Chrome apps and extensions.

I am developing chrome and Firefox extension / extension. I am using the web extension API for the Firefox extension.

Now the web extension APIs API does not yet support the chrome.gcm APIs. *. Essentially, the firefox extension cannot talk to GCM.

Is there something like GCM that the Firefox extension can talk to? Something provided by Firefox, like GCM provided by Google for the Chrome browser? If not, can someone explain how to do this in the Firefox extension?

Update : Even for web applications, firefox does not use something similar to GCM. They use service workers. Can Firefox browser extensions interact with service workers?

+5
source share
1 answer

Firefox extensions currently cannot directly use service workers ( according to the developer who worked on support for service providers in Firefox ).

Is there something like GCM that the Firefox extension can talk to? Something provided by Firefox, like GCM provided by Google for the Chrome browser?

Yes, theres the equivalent of Firefox GCM. All web applications accessed by Firefox users who receive push notifications receive them from the server specified by dom.push.serverURL . If you check dom.push.serverURL in about:config , you will see wss://push.services.mozilla.com/ , which represents the Mozilla Push Service - essentially the equivalent of Mozillas GCM.

The backend from this launches AutoPush , a Python-based open source Push server software project and its client side (as indicated in the question) exposed to web applications through service workers.

Thus, although an alternative way to extend Firefox can connect to the Mozilla Push Service, the only public document is the standard Web Push API , which relies on production services that are not yet available for use in Firefox extensions.

+8
source

Source: https://habr.com/ru/post/1241972/


All Articles