Android migration from GCM to oneSignal push notification - android

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.

Related

Remote Push Notifications in React Native for both Android and IOS

I am new to react native and I have built an app for magazines and catalogs which are loaded from my online hosting server (GoDaddy). I want to implement push notification in my app from that server on both android and IOS. Where should I begin and what are my options?
You can use services such as onesignal & fcm. Here i am sharing you some libaries for push notification
https://github.com/geektimecoil/react-native-onesignal (one signal)
You can use the below library for fcm, if you need any other firebase services such as authentication, dynamic links etc.. go for this
https://github.com/invertase/react-native-firebase (fcm)
If you just need only push notification services, you can use
https://github.com/evollu/react-native-fcm
I personally suggest you the last one, because i am using this in all of my apps and enjoying better experience with it..
note : all the above has support for both android and ios
this article will be helpfull for integration
https://medium.com/differential/how-to-setup-push-notifications-in-react-native-ios-android-30ea0131355e
Edited in 2020, last repo suggested personally is no longer maintained now. It's deprecated, as said on their repository. For future viewers, please prefer the second last package, i.e. react-native-firebase (fcm)

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.

Using both GCM and FCM in the same App

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.

Will GCM be deprecated and FCM will take place of it? [duplicate]

This question already exists:
FCM Vs GCM? Why we need to migrate from GCM to FCM [duplicate]
Closed 6 years ago.
Is firebase taking GCM place or what extra is firebase doing so that we can relay on FCM rather than GCM.
If we use GCM in our new messaging app shall we have to completely migrate to FCM in near future ?
Q. Why is Google Cloud Messaging (GCM) part of Firebase?
How does it relate to Firebase Cloud Messaging (FCM)?
A. 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.
Q. How different is GCM from FCM? What is new in FCM SDKs?
A. 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.
The new FCM SDK:
Simplifies client development. You no longer have to write your own registration or subscription retry logic.
Enables a new serverless notifications solution with a web console, Firebase Notifications. With Firebase Notifications, anyone can send notifications to target specific audiences based on Firebase Analytics insights. They can then evaluate notification effectiveness by assessing the built-in Notifications Funnel Analysis in the console.
FCM Android and iOS SDKs make messaging and notifications development easier. They offer an out-of-the-box solution so that anyone can send notifications from Firebase Notifications immediately.
Q. Is GCM going to be deprecated?
A. 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.
For More Check This: https://developers.google.com/cloud-messaging/faq
Google is now encouraging using FCM. Here it shows a message if you go to GCM doc.
Firebase Cloud Messaging (FCM) is the new version of GCM. It inherits the reliable and scalable GCM infrastructure, plus new features! See the FAQ to learn more. 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.
In future they may not update their apis as they are now focusing on FCM.
So, From my opinion if you start new then use FCM. It's nice & easy to configure & implement.

Migration from GCM to FCM needed?

Google just announced that Google Cloud Messaging is now Firebase Cloud Messaging. What does this mean for existing users of GCM and what migration (if any) are needed?
What is FCM and why should we use it?
FCM (Firebase Cloud Messaging) is a new, improved version of the Google Cloud Messaging API under the Firebase brand. It has all the features of GCM as well as some additional features. Per the Firebase FAQ, it "inherits GCM’s core infrastructure, with new SDKs to make Cloud Messaging development easier". Google explained their decision to release FCM in their Cloud Messaging FAQ, where they wrote:
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
Google recommends upgrading from GCM to FCM in their APIs for Android Release Notes. Reasons for doing so are given in the Firebase FAQ:
Benefits of upgrading to FCM SDK include:
Simpler client development. You no longer have to write your own registration or subscription retry logic.
An out-of-the-box notification solution. You can use Firebase Notifications, a serverless notifications solution with a web console that lets anyone send notifications to target specific audiences based on Firebase Analytics insights.
Is GCM deprecated?
Some features of GCM are already deprecated (see https://developers.google.com/cloud-messaging/android/legacy-regid, for example) and now in the coming days GCM is going to be fully deprecated. Google says:
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.
How to update old Android applications from GCM to FCM
From https://developers.google.com/cloud-messaging/android/android-migrate-fcm:
Import your GCM project as a Firebase project:
In the Firebase console, select Import Google Project.
Select your GCM project from the list of existing projects and select
Add Firebase.
In the Firebase welcome screen, select Add Firebase to your Android
App.
Provide your package name and SHA-1, and select Add App. A new
google-services.json file for your Firebase app is downloaded.
Select Continue and follow the detailed instructions for adding the
Google Services plugin in Android Studio.
Update: There was a recent announcement via email that GCM is now deprecated and will be completely removed next year (2019), and all GCM users should start migrating to FCM. For more details, see my answer here.
In addition to what Pritam Baral's answer, note that FCM's core is composed of GCM itself. There is no actual need to migrate to it, but it is encouraged, since when migrated to FCM, all of the features tied to it will be available for use. When referring to the Firebase Official Pricings Page, the features that are included for free are:
Analytics, App Indexing, Authentication, Dynamic Links, FCM, Invites, Notifications, Crash Reporting, & Remote Config
Pre-IO GCM implementations should still work for a longer time in the future, as stated in the GCM and FCM FAQs:
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.
As per the recent highlights:
Firebase Cloud Messaging builds on and improves the Google Cloud Messaging API. You can keep using Google Cloud Messaging with com.google.android.gms.gcm, but we recommend upgrading to com.google.firebase:firebase-messaging.
The cloud infrastructure will mostly remain the same, so existing GCM apps should continue to work fine. Although I haven't found any mention of a deprecation policy from Google yet, it would be unusual for Google to (and they have little reason to) break existing GCM infrastructure/SDK/code.
FCM seems like a better version of GCM, being available on multiple platforms (even web!) and simpler to setup (compare to GCM). Migration guides are available for Android and iOS
Google 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.
FCM
it is advance/improved version of GCM but with new brandname Firebase
very easy/Simplified client development
Server-less console where anyone can send notifications to specific device
Notification payload: 4KB, Message payload: 2KB. Note that the notification includes device and app information too.
Stores 100 notification/messages per device if the device is offline.
Firebase Cloud Messaging (FCM) is the new version of GCM. It inherits
the reliable and scalable GCM infrastructure, plus new features! See
the FAQ to learn more. 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.
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.
Yes some features of GCM is deprecated, but they are supporting all previous clients.
To upgrade from GCM SDKs to FCM SDKs, please see the guides for migrating Android
For more information.https://developers.google.com/cloud-messaging/faq

Categories

Resources