Skip to content Skip to sidebar Skip to footer

Using 2 Or More Firebase Realtime DB Inside A Single Activity

As a Blaze plan users I can create multiple database instances so that default database not gonna stuck at 100k simultaneous connections. Thing is, I'm trying to call the data from

Solution 1:

The URL in your second call to getInstance() is invalid. It's missing a colon after "https".


Solution 2:

Documentation for this can be found here: https://firebase.google.com/docs/configure/#support_multiple_environments_in_your_android_application

// Manually configure Firebase Options
FirebaseOptions options = new FirebaseOptions.Builder()
        .setApplicationId("1:27992087142:android:ce3b6448250083d1") // Required for Analytics.
        .setApiKey("AIzaSyADUe90ULnQDuGShD9W23RDP0xmeDc6Mvw") // Required for Auth.
        .setDatabaseUrl("https://myproject.firebaseio.com") // Required for RTDB.
        .build();

Post a Comment for "Using 2 Or More Firebase Realtime DB Inside A Single Activity"