Firebase Cloud Messaging ( FCM )    
This topic is assigned to Vick

--Admin--
Feb 12, 2019 10:27 AM

OVERVIEW

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, plus many new features. See the migration guide to learn more.

How this change affect my Android app?

- New Android Applications created on SeattleClouds or White Label Website will use by default Firebase Cloud Messaging.

- Existing Android Apps created on SeattleClouds or White Label Website which didn't use Push Notification feature yet will use Firebase Cloud Messaging at the next submission process.

- Existing Android Apps created on SeattleClouds or White Label Website which used Push Notification Service already, will be able to use further Google Cloud Messaging ( GCM ) with the possibility to Migrate to FireBase Cloud Messaging ( FCM ).

If you migrate Firebase or it is a new application it will be required for you to provide Firebase details.

The required Firebase details are:

1. Legacy server key
2. google-services.json

This is an example of an old application with which you can migrate to Firebase:

This is a new application for which Firebase details are required:

You will have to find the Legacy server key which can be found in Firebase section General settings of the application -> Cloud Messaging

First of all you will have to create a new project in your Firebase section.

Once created you will be able to add to this project your application ID.

In this step you will have to provide the Package Name and Application Name:

Package name is set during submission process for your application. See step 8.4 of this tutorial. If the application is submitted already then it can be found in your Application Dashboard. 

Once done you will have to download the google-services.json file (Needs to be uploaded during submission process in Push Notifications step next to the Legacy server key field):

Next proceed with all steps and then you can skip the last check:

It will be checked after you will integrate fully the Firebase in your app.

Next you will have to get the Legacy Server Key:

In General settings go to Cloud Messaging and copy the Legacy server key (Needs to be copied to Legacy server key field during submission process in Push Notifications step):

The details have to be added here during submission process in Push Notifications step:

Now you can request the app and use Firebase Push Notifications.

Note! The Legacy Server Key refers to the project, so yes, it can be used for several apps. Make sure to download and upload the json file in separate for each app. For each application once added to Firebase you will need to generate a new json file, which will include all package names and also the new added one. If you will use the older json file it will not include the new package name from the new app and for it the messaging will not work. Json same as Legacy Server Key file is added per project and is not created per app. It includes Firebase Analytics and Firebase Cloud Messaging information for all applications added to the current project. As a result all details for all apps from project are kept in one file. If you do add a new application after you have downloaded the json file, you will need to download the latest one holding the information for your new added application. Still the json file and Legacy Server Key has to be uploaded and added for each app in separate. This is done in order to separate active Firebase apps from simple no Firebase apps. If you do add a wrong json file (which does not include your app package name) the build will fail. That's why we recommend to make sure you have the latest json file which will include your application package name.

You can find the Firebase Analytics tutorial here?

A detailed explanation of each available Firebase option we'll explain in other tutorials. Please remember to check your email for important Announcements and News from Seattlecloud.

Consider to open a Support Ticket if you will have any issues or questions.

THANK YOU FOR USING SEATTLECLOUD!



Feb 20, 2019 03:40 AM
Hi Victor

Can 1 key be shared on multiple applications? or do we need to generate a key for each app individually?

Thanks


--Admin--
Feb 20, 2019 08:36 AM
Hello,

Thank you for contacting us.

The Legacy server key refers to the project, so yes it can be used for several apps.

Make sure to download/upload the json file in separate for each app.

For each application once added to Firebase you will need to generate a new json file, which will include all package names including the new added one.

Hope these details will help you.

Best regards,
Vick
SC Team

    1