Can multiple android application access same firebase database?

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


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.


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

enter image description here


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


  • From the Firebase Assistant, select Realtime Database pic_2


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


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