1

A bit of background, I am planning to allow user to use his/her Firebase database within the application by keying in its own Firebase credentials i.e. API Key, Storage bucket url, etc.

Core questions is, is it possible to change Firebase database parameters (and use the new ones) from within the android application? I can seem to get access to firebase database url using R.string.firebase_database_url but that's about it.

Now, I know, I can get around this by throwing in an intermediate layer connecting to Firebase with custom credentials but I am trying NOT to do so.

Paritosh
  • 367
  • 5
  • 20

1 Answers1

2

You can initialize a FirebaseApp instance with options that you specify in your code.

See the reference docs for FirebaseOptions.Builder.

Also see this answer for an example of how to use it: How can i store to different storage buckets using Firebase Storage

Community
  • 1
  • 1
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807