Skip to content
Advertisement

Tag: firebase

How to read data from firebase without specifying the child?

good day, here is my firebase real-time structure Here is my java code The above code is the sample of my class which i used in reading the logged user data with its firebaseUser.getUid() Question. How can i read all the User data all together without having to provide or use firebaseUser.getUid() in the child method ? Thanks. Answer By

Android studio – Java Null-pointer on Firebase invocation

The actual error I receive when running the program is: java.lang.NullPointerException: Attempt to invoke virtual method ‘com.google.firebase.database.DatabaseReference com.google.firebase.database.DatabaseReference.child(java.lang.String)’ on a null object reference This is my firebase database class: This is my main class: I’ve attempted different solutions but I still receive nullPointerException for the database. How could I properly initialize the database for access? I would really appreciate the

Advertisement