In our App, We would like to update our current GCM implementation for Push notifications to the newer FCM implementation. But, we are also using a third-party tool to run campaigns, whose SDK still uses GCM. What will be the harm in using both GCM and FCM in the same App?
I tried to look up this info in the Firebase documentation, but I couldn't find it.
Related
I would like to migrate a GCM Client App for Android to Firebase Cloud Messaging.
In the Firebase console, I selected my GCM project from the list of existing Google Cloud projects, and add Firebase,
and now, even if I update my server code to use new FCM endpoints for sending messages, Push notification will be sent to the existing GCM version Android application It has arrived.
Will Push notifications be sent to GCM version applications after April 11, 2019(GCM APIs will be removed)?
It seems that such meaning is written in GoogleDeveloper (※ https: //firebase.googleblog.com/2018/04/time-to-upgrade-from-gcm-to-fcm.html).
But my android app does not use "GcmListenerService" which appears in Google official migration guide.
my android app is an old implementation just after migrating a C2DM Client for GCM Client,
is the old implementation right after moving from C2DM to GCM, is my android app OK?
Current implementation
Start Service with the intent of
com.google.android.c2dm.intent.REGISTER specified, and register
registration ID
Receive BroadCast of com.google.android.c2dm.intent.REGISTRATION,
obtain registrationId and send it to business server
Receive BroadCast of com.google.android.c2dm.intent.RECEIVE,
receive push notification from the server.
For business reasons,
It is difficult to forcibly update the current user's Android application from the GCM version to the FCM version.
Thank you.
From the same blog post (emphasis mine):
If you have projects that are still using the GCM APIs, you will need to update your client and server code to use FCM before April 11, 2019.
With that, it seems you need to update the client app as well. There isn't any documentation that says that app versions that are still using GCM code would cease to receive messages, but the behavior to receive will no longer be guaranteed after the said date.
Business wise, you may not force the update, but make it so that users are encouraged to update by saying something along the lines of "An update is necessary to use the full potential of the app."
I came to the following conclusion, based on this (from further down the same blog post):
What happens to my users who don't update their apps?
As long as users have GCM logic in their apps, they will still receive messages. FCM is backwards compatible with GCM, so even if you don't update your server endpoint now, you can still update your app's logic, and vice versa.
And from the FAQ:
Note that client SDKs and GCM tokens will continue to work indefinitely. However, you won't be able to target the latest version of Google Play Services in your Android app unless you migrate to FCM.
So I'm going to play it safe and have both my server and app updated with FCM before the deadline.
But to answer your question, users who have not upgraded to the FCM version of the app should still continue to receive push notifications after the April 2019 deadline.
I have an old Android app, developed on eclipse, that use GCM for receive push messages (and a custom server that use GCM too for send push messages to app). Now i need to pass code on Android studio, so i need to keep GCM for push messaging (i'll upgrade to FCM later).
Now as i can read on GCM tutorial, i need to create an app on Firebase console and do few steps for use it on my Android app.
If i do it without update also my custom push server code, does both old and new app will continue receive push messages?
You can follow official migration from here
The gcm/fcm server endpoints are changed as(change the server code according to)
gcm-http.googleapis.com/gcm/ to fcm.googleapis.com/fcm/
gcm-xmpp.googleapis.com to fcm-xmpp.googleapis.com
You can also see in the guide that
Updating these endpoints is not strictly required, as Google will
continue to support the existing GCM endpoints.
I need a good solution on how can I handle/support GCM for older version builds as well as have FCM for new versions in my android app.
Problem that I am facing is, when my app is upgraded from GCM to FCM successfully, i still receive GCM message on new version builds even if i have removed all the receivers and code for it.
Now as GCM is still there running on server for older builds, I still receive GCM messages in FCM onMessageReceived().
According to fcm faq
FCM is the new version of GCM under the Firebase brand. It inherits GCM’s core infrastructure to make sure we continue to deliver messages reliably on Android, iOS and Chrome.
So it may give you the gcm messages as well
Can fallow up this official Migration doc Google Cloud messaging to Firebase cloud messaging.
please see the guides for migrating in Android.
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.
I have an Android project using GCM push notification, but my client wants me to migrate from GCM to oneSignal push notification. (negotiable)
The project is a bit old and developed using eclipse.
so my question; is it a good idea to change to oneSignal and what is the difference between GCM and oneSignal ? Better performance ? more features ? is it recommended to use it instead of GCM? Sorry I am an Android beginner and couldn't really find lots of information about oneSignal any help is much appreciated!
OneSignal provides both an API, as well as marketing tools for notifications.
Unlike using the GCM/FCM APIs directly, with OneSignal you can target specific segments of users, schedule notifications, and monitor notification click through rate. OneSignal also provides an Android SDK which takes care of many technical implementation details.
Behind-the-scenes OneSignal then connects to GCM/FCM and sends notifications on behalf of your application.
First, are you aware that Eclipse is no longer officially supported for Android Development. Using Eclipse may be preventing you to quickly creating apps and finding the necessary resources to build a project.
To migrate to the Android Studio from Eclipse just follow this tutorial from Google developers.
Now, for your question about GCM and onesignal, why don't you consider the FCM. The FCM is the new/upgrade version of the GCM. It inherits the reliable and scalable GCM infrastructure, plus new features! If you are integrating messaging in a new app, start with FCM. GCM users are strongly recommended to upgrade to FCM, in order to benefit from new FCM features today and in the future. And FCM is easy to use plus it simplifies client development. You no longer have to write your own registration or subscription retry logic
This SO question will add you more information about FCM.
If you still want to migrate to oneSignal, then this link will help you to know what is oneSignal and why you should use it.