Migrating GCM to an existing Firebase project to use FCM while maintaining backward compatibility - google-cloud-messaging

am finally moving over to FCM from GCM. However, due to already having an existing firebase project, I did not import my GCM project directly over. Am currently stumped by this additional steps document by google:
https://developers.google.com/cloud-messaging/android/android-migrate-firebase-project
I am not clear as to what step 2 - 4 means. I'm worried that since I did not import my GCM project over, I'm not able to support push notifications on older clients, especially with services like Intercom

Related

What exactly happens after 10.04.2019 with legacy android apps that use GCM

We are unsure what exactly will happen with our existing apps that use GCM after 10.04.2019.
We have updated the server-side of our apps
We have new FCM-based versions of our Android apps.
However:
We cannot force the existing users to update their apps
Corporate clients might even continue to roll out outdated app
packages to new users
The information / documentation we found somewhat unclear to what will happen in such cases. Therefore, we decided to put our assumptions into 4 statement and we hope someone will be able to confirm them.
It will not be possible to put apps which use the GCM APIS into the Play Store after 10.04.2019
It will not be possible to generate a new GCM tokens after 10.04.2019
Existing users with existing apps which have already have a GCM token will be able to use their apps normally without being forced to update. E.g. Push notifications and related things will work for them.
A user of an existing app which never created a GCM token will not be able to create a GCM token and thus not be able to use any GCM related functions (e.g. Push notifications and related things). Such a user would need to update to the apps in order to e.g. receive push notifications.
I hope someone can confirm above assumptions.

How to Send Push Notification to Xamarin Android app?

I need to implement push notification to our Android App using Xamarin. Here is the process. We have web version which used by the Manager. The Manager creates and assign job to the driver. The App version is used by the Driver where it shows the list of jobs and processes of job until its complete. So, when the Manager assigned the Job to the Driver in the Web version, it will then notified to the Driver in the App version that "new job is assigned". Basically, both the web and app uses same database then we created an api(REST API in MVC C#) to connect and get data from the db to be used in the mobile app.
Can someone recommend to me which Push notification plugin(a plugin or nuget) should I use to do this? Currently, I have set up Push Notifications through App center & Firebase but not sure how this work.
Thank you.
I need to implement push notification to our Android App using Xamarin.
I would suggest you use Firebase for mobile push notifications for Android as it is a product by Google, and was made for mobile applications. For push notifications, you will be using Firebase Cloud Messaging also known as FCM. See to it that you are well versed on how it works before you start coding anything read the documents it answers most of your questions there itself.
The Manager creates and assign job to the driver. The App version is used by the Driver where it shows the list of jobs and processes of a job until its complete. So, when the Manager assigned the Job to the Driver in the Web version, it will then notified to the Driver in the App version that "new job is assigned". Basically, both the web and app use the same database then we created an API(REST API in MVC C#) to connect and get data from the DB to be used in the mobile app.
For this, you will have to check on how to work with Firebase using Rest-API. Once you configure the Rest-API and then apply your business logic to it things will be quite easier than you might have imagined.
Can someone recommend to me which Push notification plugin(a plugin or NuGet) should I use to do this?
My recommendation is quite simple, Do not use any sort of a firebase push notifications plugin!. I have had a very bad past with plugins and ever since then I never recommend fellow developers to use plugins until it is a well-maintained one. I would rather ask you to simply configure Firebase on the basis of the guides that are available online. Like the following Xamarin.Android guide for FCM. It is detailed contains everything that you are looking for and what else I would suggest is you check firebase related answers on SO and you will find that almost everything that is not available in docs is covered around here and in detail. Like the following:
How to handle Firebase Notification i.e. Notification Messages and Data Messages
Push Notification in android with firebase get token
How to send device to device messages using Firebase Cloud Messaging?
Receive push notifications on one android app from two Firebase projects

In Codename One which is supported either GCM or FCM?

As per this link, FCM is the new version of GCM under the Firebase brand. In Codename One, which is supported? GCM or FCM?
We currently use GCM internally. We can switch to FCM but there is no real reason. Google has no intention of removing GCM as FCM (and a lot of apps) depend on it.
They are pushing FCM to push firebase. This provides no advantage to Codename One users as the easier API isnt' relevant (we abstract away the pains of GCM).
Bottom line is that you don't need to worry, if there is a need to switch to FCM we will do it for you and it will be seamless.
I'm not too familiar with Codename One so I decided to go ahead and look into their site. I found this Codename One page that guides about Push Notifications, but noticed that it's an old guide since this was still using the Developer Console when generating the Server Key (used for GCM/FCM).
With that, I went ahead and asked the Codename One chat support (lower-right side of the page). Chat history below:
Me:
Hey guys. I was wondering what Push Notification Services do you Support?
I've seen this link -- https://www.codenameone.com/how-do-i---use-push-notification-send-server-push-messages.html
Do you have your own Push Notification Service? Or are you guys using GCM? Is it already integrated with FCM too?
Lianna (Chat Support):
Hi,
we use the native push notifications for the respective platforms GCM, Firefox, Chrome, Microsoft and ipns.
Currently we use GCM and not FCM as the advantages given by FCM are mostly for API usage (which isn't applicable) and not very portable (available only for Android). When/if we switch to FCM this would be seamless thanks to our abstraction of the service.
FYI that video is a bit out of date, there is more up to date coverage in our developer guide.
Credit goes to Lianna (Kudos! :)). I think this here is the developer guide she was referring to.

PushSharp - GCM Authorization Failed

Using v4.0.10 of Pushsharp (nuget package), I am getting error GCM Authorization Failed when sending push notifications to Android devices.
Seems the bug raised in issue 574 (https://github.com/Redth/PushSharp/issues/574 ) has been compiled into the nuget package, yet I'm still getting this error.
Could this be related to the introduction of Firebase Cloud Messaging?
Does anyone still have success using GCM?
As of right now, GCM is still usable. However, it is highly encouraged for new users to use FCM instead. Either way, for both GCM and FCM, you must use a Server Key generated from the Firebase Console. There is a visible note in the GCM docs saying:
Starting from Sept. 2016 new server key can only be created in the Firebase Console using the Cloud Messaging tab of the Settings panel. Existing projects that need to create a new server key can be imported in the Firebase console without affecting their existing configuration.
The Authorization error has been encountered by number of users, some also had an old project. See my answer here for more details.
The sender id used in the app code needs to match the sender id Firebase Cloud Message Console and its corresponding "Firebase Cloud Messaging token".
Thank you #AL for your help.

Does upgrading GCM preserve the current API Key in use?

I am upgrading a project that has an older version of GCM (7.5) to the latest version of GCM (9.2). The current project already has a server API key and that key is in use to send push notifications to current users of the app. My specific question is if we generate the JSON configuration file for the current app with it re-create(create a new API key) or over-write the current API key we have in use? We would like to avoid having to do that if possible.
Thank you in advance for any clarity that can be provided.
I haven't experienced upgrading a lower version of GCM to a higher version, but to test this out, I tried importing a Google Project to the Firebase Console (so its like GCM to FCM), keeping in check the current Server Key.
After successfully importing the project to Firebase, the Server Key from before is retained, and can be seen being used in the Firebase Console. So I think the same behavior can also be expected when upgrading a lower GCM version to a higher version.
I also don't see why the Server API key would re-generate if the GCM project is upgraded.
Though I'm not entirely sure. Hope this helps somehow. Cheers!