I am using Firebase emulators to test my Android app. I'm trying to set up a testing environment where an Android emulator(AVD manager device) AND an android real device have access to my Firebase emulator real time database found on http://localhost:4000.
I can make both(real and virtual) devices, individually, have access to the Firebase emulator database, but NOT both at the same time.
I have my real device connected via USB port and allowed USB debugging and my Android emulator running at the same time. Then, on the Android Studio platform-tools folder I opened up a command window and input the following:
adb reverse tcp:4000 tcp:4000
This gives me an error: adb.exe: error: more than one device/emulator
Inside my firebase.json file found inside my Firebase emulator project I have the following set-up for connections to my database:
"database": {
"host": "localhost",
"port": 9000
},
How can I make both (REAL and VIRTUAL) devices or two (Virtual) devices connect to Firebase emulator Real Time data base?