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 ().
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.
Enter the following details and click Register app
:
-
Android package name: The package name of your Android app (e.g.
com.example.myapp
) as defined in thecapacitor.config.ts
file: -
App nickname: A nickname for your app (e.g.
My App
). -
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:
The default password for the debug keystore is
android
.The output should look like this:
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.
After that you are done. The rest is already configured in the starter template. Click on Next
twice and then on Continue to console
.