Is Firebase Cloud Messaging free? - android

I need to implement push notification feature in my application. Exploring some options.
Google recently recommends Firebase platform, but this is not completely a free service. So I thought of using GCM again. Will google stop support for GCM in future?

Firebase Cloud Messaging is free of charge, just like Google Cloud Messaging was. The Firebase pricing page shows exactly what Firebase features are paid.

Yes, it's free. You can use Analytics for advanced messaging - out of the box.
Which products are paid? Which are free?
Firebase's paid infrastructure products are the Realtime Database,
Firebase Storage, Hosting, and Test Lab. We offer a free tier for all
of these products except Test Lab.
Firebase also has many free products: Analytics, Notifications, Crash
Reporting, Authentication, Remote Config, Dynamic Links, Firebase
Invites, and App Indexing. You can use an unlimited amount of these in
all plans, including our free Spark Plan.

As of April 10, 2018, Google has deprecated GCM. The GCM server and client APIs are deprecated and will be removed as soon as April 11, 2019. Migrate GCM apps to Firebase Cloud Messaging (FCM), which inherits the reliable and scalable GCM infrastructure.

There is no such thing "unlimited" for free.
If you will send billions of billions messages a day, you will likely hit the maximum throughput limits and get blocked, or perhaps some sales man will contact you.

https://firebase.google.com/pricing/
This link should help you understand better. If you are implementing push notifications my suggestion would be that maintain your own database for the generated device tokens instead of using topic messaging.
Two reasons why I avoided topic subscription is :
There is a limit to the number of topics you can subscribe in free plan
Topics are not subscribed immediately
Although the number of active users allowed in parallel connection has a limit but its too much to exceed that easily.
P.S. I use the spark plan by the way

It’s free but limited with rates - see https://firebase.google.com/docs/cloud-messaging/concept-options
No clue how Telegrams handles to work with this at their 700M active users paste.
My guess they opened hundreds of cloudflare projects and invoke the api in a round robin with some custom proxies and load balancers.

Not completely free. This is the pricing strategy.
https://firebase.google.com/pricing

Related

Google Cloud Pub_Sub

Hello Everyone,
I have create gmail app and complete all types of functionality but one functionality not implemented this one is mail receive in our gmail app.
Me search any types solution for receive mail and i have found one solution is google cloud Pub/Sub but this pub/sub how to implemented in our app is not idea show please tell me any one how to used pub/sub in android.
Cloud Pub/Sub is not the right choice for receiving messages on Android. The service is designed for inter-service communication. Using it on Android would present two problems:
The limit on the number of topics and subscriptions per project. Only 10,000 topics and subscriptions are allowed and only 10,000 subscriptions per topic. If you plan to scale out to many devices, you will run up against these limits quickly.
Security/authentication issues. You would need to ship the credentials within the Android application and so you will either have to generate service accounts for every individual device or use the same one across all devices. What do you do if those credentials are compromised? In the former case, you have to keep track of all of them and revoke the right one. In the latter case, revoking the privileges means all of your devices stop working.
You need something like Firebase Cloud Messaging to send data to Android devices. You may use Cloud Pub/Sub as a means to generate notifications out of GMail, but the subscriber would be another server-side application or perhaps a Cloud Function that passes the notification on via Firebase Cloud Messaging.

Can I use both GCM and FCM in my app?

I have an android project in which GCM is implemented. Back-end (server) is already coded suitably with GCM.
Now is it possible to add firebase (FCM) in my project and work in parallel with GCM? I cant migrate to FCM because it is impossible to change my back-end code as it is a big project and too much code is there. Has anyone done something like this?
Please help. Thanks in advance.
Though my particular case might be a bit specific, because the project I am involved in has a very specific backend, it seems to me FCM interoperates well with GCM, i.e you can have both in your app, GCM and FCM broadcast receivers / receiver services, and they will both work as well with no conflicts.
This has a huge advantage because you don't have to decide with migration at once, you can do this more gradually.
Well done, Google!
No, you can not use both FCM and GCM at same time. GCM is the old version and that it is strongly recommended to use FCM.
Why is Google Cloud Messaging (GCM) part of Firebase? How does it relate to Firebase Cloud Messaging (FCM)?
Google is investing in Firebase, making it our unified mobile
platform.
Over the last few years, we have expanded GCM to send messages to
multiple platforms beyond Android: iOS and Chrome. Firebase is known
for being cross platform, so FCM now makes a natural fit in the
Firebase suite of features designed for Android, iOS, and mobile web.
Another core value of Firebase is cross-feature integration. We are
adding the ability for other Firebase features to easily send messages
via FCM. For example, you can use Firebase Notifications to send
reengagement messages to your users.
We think that GCM will be even more useful to developers as an
integrated part of Firebase. You can still get the same great product,
now under a new name: "Firebase Cloud Messaging," or FCM for short.
Is GCM going to be deprecated?
We will continue to support the current version of GCM Android and iOS
SDKs because we know a lot of developers are using GCM SDKs today to
handle notifications, and client app upgrade takes time.
But all new client-side features will be added to FCM SDKs only moving
forward. You are strongly encouraged to upgrade to FCM SDKs.
You can get more details here
As per FAQ you don't need additional server configuration when you're migrating your client app from GCM to FCM, so just use FCM in your android app.
Here's the docs on how to migrate your app
I find the problem to use both GCM and FCM together. You will get to different deviceToken and one of these token get NotRegistered error.
For my FCM token always get NotRegistered error but the app is active and not uninstalled and my GCM token is valid and gets a push notification.

Is GCM (now FCM) free for any limit? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 1 year ago.
Improve this question
I would like to know if Firebase Cloud Messaging is free or not for unlimited users?
In addition to the answer from AL.
From the Pricing page Faqs:
Which products are paid? Which are free?
Firebase's paid infrastructure products are the Realtime Database,
Firebase Storage, Hosting, and Test Lab. We offer a free tier for all
of these products except Test Lab.
Firebase also has many free products: Analytics, App Indexing,
Authentication, Dynamic Links, Cloud Messaging, Notifications,
Invites, Crash Reporting, &, Remote Config. You can use an unlimited
amount of these in all plans, including our free Spark Plan.
So, it's free. The limit is not mentioned anywhere in the docs, however there's a limit on the Firebase realtime database, as mentioned in the FAQs:
Firebase imposes hard limits on the number of connections to your app's database at the same time. These limits are in place to protect both Firebase and our users from abuse.
The free plan limit is 100, and cannot be raised. The Flame and Blaze
Plans have an initial limit of 10,000 simultaneous database
connections. This is to prevent abuse and can be raised by contacting
Firebase support with 24 hours notice.
This limit isn't the same as the total number of users of your app,
because your users don't all connect at once. We encourage you to
monitor your peak simultaneous database connections and upgrade if
needed.
We're working hard to remove the initial 10,000 simultaneous
connection cap on the Flame and Blaze plans.
So if you are using the Firebase Database to save your User's data and want to send a lot of Push Notifications to your user's devices using the FCM registration token stored in the Firebase Database, you might hit the limit in the free Spark plan, however it's really tough to hit the 10k limit.
From the Firebase Cloud Messaging Docs:
Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably deliver messages at no cost.
You can refer to the official Firebase Pricings page. From there you will be able to see the types of projects that are available: SPARK, FLAME, BLAZE, to which all of them have FCM (along with Analytics, App Indexing, Authentication, Dynamic Links, Invites, Notifications, Crash Reporting & Remote Config) included for free.
Firebase Cloud Messaging (FCM) Connection Server (CCS) sits between the device and the app server. The following limits apply
From the documentation here, it seems FCM does impose a limit of 1000 connections in parallel.
For each sender ID, FCM allows 1000 connections in parallel.
Sender Id is a unique numerical value created when you create your Firebase project, available in the Cloud Messaging tab of the Firebase console Settings pane. The sender ID is used to identify each app server that can send messages to the client app.
Note: Please correct me if this limit is not about the max connections from an app server to CCS
Secondly, You should also read about Flow Control if you are using the XMPP connection server protocol (which has to be used if using device-to-cloud messaging). There should not be more than 100 unacknowledged messages towards CCS at any single point of time.
If the pending message count reaches 100, the app server should stop sending new messages and wait for CCS to acknowledge some of the existing pending messages

Topics on Firebase Cloud Messaging?

Is there any constraints about number of different topics for Firebase Cloud Messaging in one app?
Nope. Seeing that FCM has GCM as its core, there is no limit in the number of Topics for any app. There used to be a 1 million limit, but it was removed. You can refer to this Google Developers Blog for that.
Also, when creating a Topic in FCM, it could take up to 24 hours for it to be show up in the Firebase Console, as per this post. Cheers! :D
No I don't think so!
Based on the publish/subscribe model, topic messaging supports unlimited subscriptions for each app. You compose topic messages as needed, and Firebase handles message routing and delivering the message reliably to the right devices. link
Seems like you can create topics when you need them!

Google Push Notification

Just now Google introduced Google Cloud Messaging for Android. But here problem is that end user must have atleast one google account to use this service. is possible to skip GCM and send push notification end user or suggest any other way?
Important: C2DM has been officially deprecated as of June 26, 2012. At that time C2DM stopped accepting new users and quota requests. C2DM has been replaced by Google Cloud Messaging for Android (GCM). The C2DM service will continue to be maintained in the short term, but developers must use GCM for new development. We also encourage developers to move existing C2DM applications to GCM to take advantage of GCM features. See the C2DM-to-GCM Migration document for more information.
Well this is part of C2DM prerequisite Can't skip this mate.. thanks
To use GCM user have to be registered in goggle service. If you distribute you application only by Google Play this is not a problem.
There are alternatives but they have lots of disadvantages: sending SMS (you have to pay for it); implement own Push Notifications (by polling your server) - it is easy to make some mistake and drain phones battery and requires lots of work.

Categories

Resources