﻿
# Android Firebase Configuration (`google-services.json`)

The `google-services.json` file connects your Android app to its Firebase project so it can receive Firebase Cloud Messaging (FCM) push notifications.

## Register your Android app and download the file

1. Sign in to the [Firebase Console](https://console.firebase.google.com/).
2. Open the Firebase project for your app. If you need a project, create one and follow the setup prompts.
3. On the project overview page, select **Add app → Android** or select the **Android** icon.
4. Enter the app's Android package name (application ID), such as `com.yourcompany.yourapp`. The value is case-sensitive, must match the app's application ID exactly, and cannot be changed after registration. For a Cloud Softphone white-label app, find the full value under **Whitelabel options → Android → Android Package ID** in the Cloud Softphone portal.
5. Optionally enter an **App nickname**, then select **Register app**.
6. Select **Download google-services.json**.

If the Android app is already registered, open **Project settings → General → Your apps** in the Firebase Console. Select the app with the matching package name and download its `google-services.json` file.

## Add the configuration file to your app

### Cloud Softphone white-label app

1. Sign in to the [Cloud Softphone portal](https://providers.cloudsoftphone.com/) and open your white-label app project.
2. Select **Edit** in **Whitelabel options**, then open **Android**.
3. Upload `google-services.json` in the **Firebase Settings JSON file** field.

### SDK-based app

Place `google-services.json` in the root of your Android app module, typically `app/`. Follow the [Firebase Android setup instructions](https://firebase.google.com/docs/android/setup#add-config-file) to configure the Google services Gradle plugin.

## Set up the FCM service-account key

The push server uses a service-account private key to send notifications. Follow [FCM Service Account Private Key Setup](fcm-setup.md) for the Firebase project you used to register the app.

