V
V
Vinni372019-06-11 19:25:42
JavaScript
Vinni37, 2019-06-11 19:25:42

Outgoing messages for Web Push (FCM)?

Good afternoon.
I have an extension for chrome, previously GCM (Google Cloud Messaging) was used to communicate with the server, in particular:

chrome.gcm.send
chrome.gcm.onMessage

On the NodeJS backend as an XMPP server for receiving push notifications.
Due to the imminent demise of this service (the documentation has already been deleted), it was decided to try switching to FCM (Firebase Cloud Messaging). But as it turned out, there is no analogue of chrome.gcm.send in FCM . Additionally, it is not possible to silently receive Push in FCM (without notifying the user). Googling made it clear that FCM for browsers is based on the Push API, where the same restrictions apply.
Vozink question how to replace GCM in terms of communication between the extension and the server? Direct HTTP requests are extremely bad.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
grinat, 2019-06-12
@grinat

I googled it badly, fcm allows you to pass custom data in the same way, or your push handler, in this case, the processing of what to show or not show on you. Sending from the server is the same. They abandoned it because it worked like shit on androids, with fcm really receiving / sending is instant if there is Internet.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question