Jared Nelson
Jared Nelson

Reputation: 274

Multiple projects for one app in Firebase: What to give as Android Package Name

I already have a Firebase project setup with a production environment. I am wanting to create a development environment for my firebase app. I see there's quite a bit of documentation about this. I need to obtain a google-services.json according to the docs. To obtain a google-services.json, I have to add an app inside of the second Firebase project. My specific question is what do I give as the Android Package Name once I'm in the secondary project (giving the same Android Package Name as my original project seems like it will just point to the same place)? And do I fill out the SHA1 key? Any help would be much appreciated!

Upvotes: 5

Views: 4485

Answers (1)

sammalfix
sammalfix

Reputation: 320

The package name has to be the same as in AndroidManifest.xml ("It's important to enter the package name your app is using", Firebase Documentation), so if you haven't somehow configured it to be different in your development environment, then you have to use the same one as in production. Projects added in Firebase don't "point to" anything; rather, your app will point to a Firebase project based on the contents of google-services.json. You will need to configure the app build variants to use the right file, see Support multiple environments in your Android application.

The instructions for adding Firebase to an Android project don't mention anything about SHA1 fingerprint, so you might not need it. If it turns out that you do, it is possible to add it later in Firebase Android project settings. However, you will have to add a release certificate SHA1 fingerprint to the production Firebase project before your app is launched (see Firebase Launch Checklist).

Upvotes: 2

Related Questions