0

I'm not sure if this is possible:

I have two projects made on the Firebase console. I'd like to use both in my Android project. Don't ask me why there's two, because that was the client's decision. However I'm not sure if its possible to use both without the REST API.

Firebase instance creation has no options and I assume it uses the JSON file to configure itself. Is there a way to add two projects in the JSON file maybe?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
breakline
  • 5,776
  • 8
  • 45
  • 84
  • Your mention of "Firebase instance" implies you are using the [legacy SDK](https://www.firebase.com/docs/android/api/). Is that right? The new 9.X SDK provides [FirebaseApp](https://firebase.google.com/docs/reference/android/com/google/firebase/FirebaseApp) and [FirebaseOptions.Builder](https://firebase.google.com/docs/reference/android/com/google/firebase/FirebaseOptions.Builder) to configure entry point instances for the APIs. – Bob Snyder Sep 19 '16 at 02:57
  • I dont think its currently possible have 2 projects : 1 app, BUT I know you can have 1 project : 2 apps... you could split your database into two separate branches. Dont know if that helps you at all. – Nerdy Bunz Sep 19 '16 at 03:05
  • See http://stackoverflow.com/questions/37634767/how-to-connect-to-more-than-one-firebase-database-from-an-android-app/37643374#37643374. It will also be covered in an upcoming post on [the firebase blog](https://firebase.googleblog.com/), but that doesn't help you yet. – Frank van Puffelen Sep 19 '16 at 03:58

0 Answers0