Google's proprietary Firebase Cloud Messaging (FCM) solution poses several problems for developers who wish to implement push notifications in their apps, especially AOSP developers. License requirements, costs, and privacy concerns have forced developers to look for FCM alternatives.
One of the problems with FCM is that you need Google Mobile Services (GMS) licensed for your Android version to be able to use FCM. Licensed Android versions are usually developed by large phone and tablet manufacturers. Smaller use cases by industry specific OEMs have a hard time to pass all of Google requirements for their Android Custom ROMs.
This is why Custom ROMs typically don't have GMS because obtaining the license from Google is a painfully resource-intensive procedure that sometimes fails completely, depending on the hardware being used and the number of devices created. Custom ROM developers for professional and private use cases alike must therefore look for FCM alternatives to implement Android push notifications on the device.
Fortunately, several Android cloud messaging alternatives exist.
What is FCM?
If you use Firebase push notifications in your mobile device, the device needs to have GMS—Google Mobile Services—installed on it. This has prompted many developers to look for FCM alternatives.
The other reason to look for FCM alternatives is that all data processed via Firebase services go through Google's servers. This poses privacy concerns and might be forbidden entirely, based on the server location.
Is there an alternative to Firebase?
People looking for an alternative to Firebase Cloud Messaging are in luck. Several FCM alternatives exist, both as open-source and closed-source options, and also with or without Google's Push Service as the backend. These alternatives included UnifiedPush, Gotify, Amazon AWS SNS, and emteria's push service.
Benefits of FCM alternatives
The main reasons people look for FCM alternatives are:
- Pricing concerns
- Privacy concerns
- Vendor lock-in
- Avoiding unnecessary apps (such as the Google Play Store) on professional devices
One of the primary reasons for FCM alternatives is pricing. FCM uses the typical "cloud-service-style" pricing that lists endless options and tiers that don't easily add up to a final number.
For apps running only on a handful of devices, the pricing makes sense. FCM also provides a free tier for a small number of messages. For apps running on thousands of devices and therefore requiring tens of thousands of messages, the costs can quickly add up, leading to a need to investigate FCM alternatives.
FCM is a Google Push Service. All communications run through Google's servers, and Google enforces sending its tracking code in FCM messages for tracking purposes. This poses privacy concerns for companies, especially those that deal with users in Europe and therefore need to ensure they are GDPR-compliant. Beware that some FCM alternatives use Google's Push Service as a backend (they mainly avoid the need for GMS), but others exist that don't, such as UnifiedPush and Gotify.
Because FCM is so tightly coupled with Google, the risk of vendor lock-in is very real. A perfect example is Android itself. Although Android is open-source and anyone can use the AOSP (Android Open Source Project) and modify it, the Android ecosystem is very much controlled by Google. You need licenses for GMS, and Google's proprietary Android versions contain features that AOSP doesn't. This makes companies somewhat reliant on staying on Google's good side.
By using FCM alternatives, you avoid the potential lock-in from using a Google-driven service.
Some providers of FCM alternatives also offer support for smaller companies, not only major smartphone manufacturers.
FCM alternatives prevent the app bloat that comes with installing Google-specific services on a device that might not be necessary on professional devices. For example, IoT devices don't need Maps or YouTube. They also don't need many of the Google-specific libraries that GMS devices contain.
The decision "GMS vs. non-GMS" is the major driving force behind the search for FCM alternatives. By using FCM alternatives that don't rely on Google, you can prevent device bloat by nor installing the Google framework necessary to use FCM.
FCM alternative open source
Not all FCM alternatives are open-source. Some of the open-source alternatives are:
The greatest benefit of open-source FCM alternatives is that they completely avoid vendor lock-in. Their greatest con is that many become abandoned, such as Pushkin or Android PN, which hasn't received an update since 2017.
UnifiedPush is a promising project, maintained by the active F-Droid community, and offering a complete push notification service that can run on self-hosted or proprietary servers. We talk about it in detail below.
List of FCM alternatives
Let's take a brief look at the top push notification services provided as FCM alternatives. Some of these alternatives to FCM don't offer the full functionality required for a complete solution. For example, a few of them provide browser-based notifications that don't wake up any apps on your device. If your FCM alternatives needs are simple, this functionality might be adequate.
The MicroG project is co-sponsored by the German Federal Ministry of Education and Research. In essence, it lets you use Google Push Services without having an active GMS license. MicroG replaces the Google Play Service on the device.
It works like this:
- FCM requires Google Play Services to work. That's because Google Play Services is the only app allowed to constantly run in the background by default.
- When Google Play Services receives a message from FCM, it sends that message to the respective app, waking it up.
- MicroG "pretends" to be Google Play, stays awake, and can receive messages from FCM and forward those messages to the respective apps.
OneSignal is a popular proprietary push notification service for iOS, Android and more.
If you want to the notification serve and distribute your apps on the Google Play store, you'll need a Google Firebase Server Key to use OneSignal.
LeanPlum is a personalization and optimization solution that incorporates push messaging. By default, LeanPlum uses FCM for its Android push notifications. You can use third-party services but this requires writing custom classes of code.
CataPush lets you add real-time notifications to your app. They provide an SDK that you have to integrate into your app to get the notifications working. Unfortunately, CataPush relies solely on a Firebase backend for its Android implementation and it doesn't look like there's an option to use other services.
Amazon Web Services SNS (Simple Notification Service)
Amazon's SNS gives you 1 million free notifications per month. It provides A2A (app-to-app) and A2P (app-to-person) functionality. The SNS service can send messages directly to apps on an Android device, and then the device displays them.
Some key differences exist between SNS and FCM, specifically:
- SNS doesn't let you track the online and offline status of devices, which is crucial for many use cases. FCM does allow this.
- SNS offers no message history function, and FCM does.
SNS's pricing also suffers from a similar byzantine complexity that FCM does—the "cloud-style-pricing" that has turned out, in some cases, to be more expensive for growing businesses than originally expected.
Azure Notification Hubs
As far as Microsoft-powered FCM alternatives go, we have Azure Notification Hubs. This solution supports iOS, Android, Windows, Kindle, and Baidu. You can use your own back-end server, either on the cloud or on-premises. The platform gives you $200 in free credit to get your toes wet and test it out.
Gotify (Open Source)
Gotify is a 100% open-source solution licensed under the MIT license. It's a fairly bare-ones solution with limited functionality but it's extremely easy to set up. You have to install the Gotify Android app and disable battery optimizations for it, then configure your own Gotify Server.
So, it's definitely one of those FCM alternatives "made for developers." For a full solution that wakes other apps up and can be used with a variety of servers (not only self-hosted), check out UnifiedPush below.
UnifiedPush by F-Droid (Open Source)
UnifiedPush is one of the most complete non-Google FCM alternatives that is also open source. It offers the full set of tools to send and receive push notifications. The solution was created by F-Droid, the open source community of the F-Droid app store.
UnifiedPush uses a special application on the device, called a distributor, that maintains an active connection to the server to handle messages. The distributor then wakes up the appropriate app on the device that the push notification relates to.
MDM solution by emteria (enterprise-ready)
Emteria offers a simple solution that is already baked into emteria.OS, an Android distribution that works on a wide variety of hardware configurations. If you use emteria as your Android distribution, you don't need to install any additional software to handle push notifications. It works via the emteria MDM app (enable MDM).
Use emteria as an FCM alternative to send push notifications
Emteria's MDM services solution is built natively into the Android operating system, and it incorporates a push service. Devices running emteria therefore are automatically enabled for push service notifications that run on emteria's reliable backend.
Emteria's solution is also battery-efficient because the server maintains a constant connection with the pre-installed MDM app. Other apps then don't need to maintain this constant connection, thereby saving battery power.
Google Push Service:
Benefits, limitations, and alternatives
Want to keep your Android app users engaged in real time? Push notifications are a must-have. But is Google Push Service the best option? Let's find out!