Home > Software engineering >  Android push notifications without FCM Backend
Android push notifications without FCM Backend

Time:08-18

It seems to me that in the past, there was GCM (Google Cloud Messaging) which I understand as an endpoint one could send request to and if source and target are properly setup, a push notification is shown on target Android device.

Nowadays, GCM is deprecated and FCM (Firebase Cloud Messaging) is offered everywhere. It seems to me that FCM contains one more layer - FCM Backend (including logic to use Apple's APNs or web push).

Besides the contradicting information that FCM "delivers messages at no cost" and "firebase pricing plan" page where "no cost" means only "up to some limits", I would be interested:

Is there any possibility to send the push notification "the old way" (similarly to APNs) by just utilizing the Android Transport Layer (as specified on the FCM Architectural Overview) at no cost with no limits (thus not using the FCM Backend with the added value)?

CodePudding user response:

There is no cost to calling FCM to send messages, and the only usage limits are to protect misuse of the service from affecting other users.


I don't think there ever was a way to send device-to-device messages through GCM, but definitely hasn't existed in FCM since its introduction in 2016.

You can send messages from a trusted environment which then delivers them to the targeted devices, and you can (much less common) send messages from a device to FCM and from there to your server.

Sending messages needs to devices needs to happen from a trusted environment, to prevent a malicious user from being able to send whatever message they want to all of your users.

  • Related