Is it possible for multiple android applications to access a single firebase backend. If no what is the alternative in such situation?

Solution 1

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.

Solution 2

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 :)


Solution 3

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:

  • Go to Tools and click on the Firebase option.

  • From the Firebase Assistant, select Realtime Database

  • 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.

  • Your app will automatically get connected and you will be able to access your database.

Solution 4

Yes, you only need to setup your Firebase object with the same url(db). Check the documentation for more.

Solution 5

In the firebase console youll be having the option to connect the firebase to corresponding platform and its configuration. You can use that to add same firebase project to any desired platform.

Solution 6

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. I have 2 of my app accessing 1 firebase database account, so, i am quite sure it will work for you my friend!

Solution 7

Yes, You can use the same firebase database in more than one android application as below:

  1. In the Project Overview section of Firebase Console add an android application.
  2. For adding this application first you need to give that package name.
  3. 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.

  1. Add some repository and implementation in both(Project/Module) build.gradle file.

Ready to access firebase database in new android application.

Solution 8

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