Setup Google Firebase for mobile apps

Author: Dana-Maria ROBU
Publishing date: 03/02/2020
Version history: 1.2

Firebase is Google’s mobile platform that helps you develop high-quality apps and grow your business. It provides real-time database and backend as a service that allows application data to be synchronized across clients and stored on Firebase’s cloud.

In order to have push notifications and analytics within your Android apps, you need to setup Firebase.

1. Create a Firebase project

  1. Go to the Firebase platform and then connect to the console.
1
Go to console.

2. Click on the Create a project button.

1
Create a project.

3. Enter a project name and click to continue.

1
Name your project.
2
Click to continue.

4. Enable Google Analytics for your project and click to continue.

1
Enable Google analytics.
2
Click to continue.

5. Configure Google Analytics and check the sharing options.

6. Click the Add Firebase button to generate your project.

1
Configure the analytics.
2
Click to generate the Firebase project.

This may or may not be important depending on your country's rules and regulations. Please check the requirements.

The Firebase project is being generated.

2. Add Firebase to your mobile apps

Once the project is created, you should see it on the list of available projects.

  1. Select the project from the main page and follow the steps to add firebase to your app.
1
Click on the project.

2. Register the Android app in Firebase:

  • Fill in the Android package name
  • Add an app nickname

3. Click on the Next button to get to download the config file.

The same procedure for an iOS app.

1
Register the app.
2
Click to continue.

4. Download the config file by clicking the Download google-services.json button.

5. Click on the Next button to add the Firebase SDK.

1
Download the config file.
2
Click to continue.

6. Click to add SDK Firebase.

1
Click to add Firebase SDK.

7. Click on the scroll wheel to get to Project settings, General tab, once your project is imported in Firebase.

1
Click on the Project settings.

8. Scroll down to Your apps and select the app: Android and/or iOS.

9. Copy the App ID to paste it afterwards in the AppFactory Firebase section.

10. Download the google-services.json file to be uploaded in AppFactory.

11. Paste the Firebase App ID in the dedicated field in AppFactory: Android and/or iOS.

The App ID must be exactly same as on Firebase console. The google-services.json file name must be as it is.

In your computer, if the downloads directory already has this file, the new file might download as google-services(1).json, which is an invalid name. Keep the files backup and delete the file from download destination directory and download it newly.

Vouchers
Next Post

Leave a Reply