I am working on an Android app and trying to use Firebase Database. I tried to write data to the Database but nothing was showing up (checked via Firebase console). I have Firebase libraries in the build:
implementation platform('com.google.firebase:firebase-bom:26.2.0')
implementation 'com.google.firebase:firebase-database'
My Firebase Database URL as per Firebease console is :
https://xxxxxxxx-xxxxxxx-default-rtdb.europe-west1.firebasedatabase.app/
whereas when I get a reference to it from the code:
private DatabaseReference mDatabase;
mDatabase = FirebaseDatabase.getInstance().getReference();
Log.i(TAG," Reference is: "+mDatabase.toString());
The logcat shows below response:
I/Tag: Reference is: https://xxxxxxxx-xxxxxxx-default-rtdb.firebaseio.com
I also have the google-services.json file in the project which points to the same database URL shown in the Firebase console. It appears to me that Firebase has misconfigured my database somewhere which I can't see / configure.
Is there anything I am missing?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…