Does FCM work well with AWS SNS? - android

I am developing a push notifications architecture for our app. I am planning to use AWS-SNS with APNS and GCM. Google now recommends to use FCM (Firebase Cloud Messaging) instead of GCM for new apps. I wanted to understand if FCM is compatible with SNS or there can be some issues ? Are there any workarounds ?

Yes, FCM is backwards compatible with GCM (and thus SNS). I've written a small guide for FCM on SNS in this answer as there are a few gotchas.
The FCM API allows a superset of GCM functionality if you use it directly but functionality wise you don't lose access to anything already available in SNS. It's also nice and easy to use.

Yes FCM is compatible with SNS, you need to be a bit careful about the payload as the format is a bit different.
For detailed tutorial read the following article.

Firstly while it is recommended to use FCM, GCM is still being supported and thus any service built on GCM should continue to work as expected. Also currently (this may change in the future) from a sending perspective there is no difference between FCM and GCM.

Related

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.

FCM Limitation for Android Push Notification?

We are migrating from GCM to FCM in one of our projects.
One of our clients asked us "Like GCM has 100 notification limit" Do we have any limitation for FCM.
Can we use the same sender-id and key for multiple environments like Dev/QA/UAT and also production?
Thanks in advance
As far as usage limitation goes, FCM is pretty much the same with GCM. See my answer here and here.
When you migrate your Google Project to Firebase, it would still retain the Sender ID. Where it is used depends entirely if it's compatible to it.

Android migration from GCM to oneSignal 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.

Which is the best way to send Push Notifications in Android?

Currently i am using onesignal.com push notifications. Is there any better service or better way to send push notifications in Android with more features?
You can use both GCM(Google Cloud Messaging) and FCM (Firebase Cloud Messaging).
Some features of GCM are deprecated so Google is suggesting to use FCM.
FCM has a killing feature of sending notification to all users who have installed your app all or to those users who have subscribed to a particular topic(You can even check for topics i.e. Weather report for INDIA(who stays there),AUSTRALIA(who stays there).
You can implement FCM in your app very easily.
With FCM you can either use a Third Party Server or can send notification using their own cloud service.
Just visit and register your app with a coolest feature provided by Google-FireBase Cloud Messaging.
You can even check some videos on Youtube-Google Developer Videos
I use it with a lot of very nice handy feature here
I'm using Firebase (https://firebase.google.com/). It's easy to learn and has good documentations.
You can use FCM (Firebase Cloud Messaging) to implement push notification. for better understanding go through this article

Can an android work on both GCM and C2DM?

I have an app that currently uses C2DM for push notifications. I would like to inquire if I update the app to GCM and if some users do not upgrade their app, will Google allow me to use both the C2DM and GCM for the two versions of my app?
Or will the users on my previous app never receive a PUSH notification altough I still have the push logic implemented for C2DM?
I've completely replaced C2DM with GCM in the app, and left support for both protocols in the server side. Works like a charm; details are here.
They will still receive them as long as you don't remove any authorisation keys, ids etc. as GCM uses the Project ID while C2DM uses the registered e-mail address.
More on it here: C2DM to GCM Migration
Once the C2DM service was deprecated recently I advice you to migrate your pushes system to GCM service.
The best way to deal with it is doing the thing like Google says. Take a look at this topic in the official GCM's documentation.
While not the original question, an interesting one would be: Can one app simultaneously use C2DM and GCM.
C2DM uses the Sender-Account while GCM uses the Project-ID to register. The only thing they both might share is the App-package name (and obviously the google account of the device, but that shouldn't matter as there are multiple apps which can use gcm/c2dm in parallel anyway).
In my experience registering C2DM and GCM in the same app can cause some serious problems.
Reason to have both in one app might be that you want to use GCM in the app, but can't everywhere because a legacy backend might not be able to switch to GCM yet. Probably a rather rare scenario - but currently happening for our app.

Categories

Resources