Is it possible for multiple android applications to access a single firebase backend. If no what is the alternative in such situation?
-
2Yes. Are you having problems with this? If so, describe what you've done and where you're having problems. – Frank van Puffelen Jun 17 '16 at 14:42
8 Answers
Yes, it is possible. Go to your firebase console. Select home tab. Click on Add App. Select Add firebase to your Android App. Provide the necessary details for the package name. Download the latest config file and add it to all the android apps connected to this firebase project.

- 677
- 6
- 8
-
1How can you add the same google-services.json file in all apps when all apps have different package name? – Abhinav Raja Oct 28 '16 at 19:21
-
3@AbhinavRaja Because google-services.json contains information about all apps at the time of download. – Eugen Pechanec Nov 04 '16 at 08:18
-
4Ohh I see, so select 'add another app' inside your project inside firebase console, instead of creating a new one. – Abhinav Raja Nov 06 '16 at 19:03
-
how about firebase auth? can we link with facebook using multiple packages? – Faruk Jun 28 '18 at 18:42
-
But like 99.99% of the time different apps have different package names. – Csaba Toth Apr 12 '20 at 22:17
-
can you tell how many apps can we add maximum to single firebase database? with spark plan and with blaze plan? – Umair Jibran Apr 23 '20 at 13:30
-
The maximum is 30 apps per Firebase project. I am attempting to get around this by using the same firebase app for all my real Apps but just changing the appId for the build. Won't be ideal for every situation. – MadMac Feb 15 '21 at 03:09
Yes, you only need to setup your Firebase object with the same url(db). Check the documentation for more. https://www.firebase.com/docs/android/guide/retrieving-data.html

- 4,795
- 15
- 19
With Android Studio 2.2 and upwards you can easily create and add apps to you Firebase project without leaving your work environment and no need to download google-services.json
From Android Studio go to Tools->Firebase and create, add apps to project of choice :)
Guide

- 16,071
- 12
- 120
- 159

- 1,594
- 2
- 15
- 25
Yes, it is possible for multiple applications to access the same Firebase Database. From Android Studio v2.2 onwards, you can directly link an app to a Firebase database via the Firebase Assistant. Here is how to do so:
- Click on the Connect to Firebase button in the Assistant, which will show you a dialog allowing you to select an existing Database or create a new database. Click on Choose an existing Firebase project, select the Database you want to use and click on the Connect to Firebase button in the dialog.

- 267
- 5
- 14
In the firebase console you’ll be having the option to connect the firebase to corresponding platform and it’s configuration. You can use that to add same firebase project to any desired platform.

- 91
- 1
- 4
Yes, it is! a single firebase database can be access by multiple app.. provided each of your apps use the same authentication details. The Firebase documentation will be a big help. https://firebase.google.com/docs/ I have 2 of my app accessing 1 firebase database account, so, i am quite sure it will work for you my friend!

- 115
- 1
- 12
Yes, You can use the same firebase database in more than one android application as below:
- In the Project Overview section of Firebase Console add an android application.
- For adding this application first you need to give that package name.
- Download config file in JSON format.
Note: you must be download a new copy of JSON because in that JSON file included package name of your application and all.
- Add some repository and implementation in both(Project/Module) build.gradle file.
Ready to access firebase database in new android application.

- 4,946
- 3
- 29
- 34
- Click Add App Button and first option Choose your App platform.
- Second step Register you application paste your app package name.
- And third step download the google config file the file paste your project's app folder and start your second application.

- 3,072
- 3
- 21
- 39