Skip to content

Add Firebase to your Android app

Register your Android app

Open the Project Overview page in your Firebase project and launch the setup workflow via the Android icon ().

Add Android app to Firebase project

If you've already added an app to your Firebase project, click Add app to display the platform options.

Next, you need to provide various information about your app.

Register Android app in Firebase project (Register app)

Enter the following details and click Register app:

  1. Android package name: The package name of your Android app (e.g. com.example.myapp) as defined in the capacitor.config.ts file:

    import { CapacitorConfig } from '@capacitor/cli';
    const config: CapacitorConfig = {
        appId: 'YOUR_APP_ID',
    export default config;
  2. App nickname: A nickname for your app (e.g. My App).

  3. Debug signing certificate SHA-1: The SHA-1 fingerprint of the signing certificate used to build the debug version of your app. You can find it by running the following command in the root directory of your app:

    keytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore

    The default password for the debug keystore is android.

    The output should look like this:

    Alias name: androiddebugkey
    Creation date: Jan 01, 2020
    Entry type: PrivateKeyEntry
    Certificate chain length: 1
    Owner: C=US, O=Android, CN=Android Debug
    Issuer: C=US, O=Android, CN=Android Debug
    Serial number: 1
    Valid from: Wed Jan 01 00:00:00 CET 2020 until: Fri Jan 01 00:00:00 CET 2040
    Certificate fingerprints:
        SHA1: 23:57:42:4A:DC:EE:7E:1C:4A:8C:0A:8F:1C:9B:9E:8F:2B:8A:1C:9B
        SHA256: 0A:1B:2C:3D:4E:5F:8A:7B:8C:9D:0E:1F:2A:3B:4C:3D:6E:7F:8A:9B:0C:1D:3E:3F:4A:5B:6C:7D:8E:9F:0A:5B:2C:3D:4E:5F:6A:7B:8C:9D:0E:1F:2A:3B:4C:5D:6E:7F:8A:9B:0C:1D:2E:3F:4A:5B:6C:7D:8E:9F:0A:1B:2C:3D:4E:5F:6A:7B:8C:9D:0E:1F:2A:3B:4C:5D:6E:7F:8A:9B:0C:1D:2E:3F
    Signature algorithm name: SHA1withRSA
    Subject Public Key Algorithm: 2048-bit RSA key

    Copy the SHA-1 fingerprint and paste it into the Firebase setup workflow.

The next step is to download the google-services.json file and move it into the android/app directory of your app.

Register Android app in Firebase project (Download config file)

After that you are done. The rest is already configured in the starter template. Click on Next twice and then on Continue to console.