Skip to content
Advertisement

Tag: firebase

How to check recyclerview is empty or not using dataSnapshot.hasChildren()

I am using firebasedatabase to show my data into recyclerview. I want to show simple toast when my recyclerview is empty and i am using dataSnapshot.hasChildren() for checking the database haschildren or not. here is code when data is available the dataSnapshot.hasChildren() giving true value but when no data available else condition is not working Answer you can use dataSnapshot.getChildrenCount()

Trying to retrieve data from Firebase and get this error: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length

The database I build an application and I’m trying to retrieve user info from Firebase. After the registration form, I have a new activity where the users need to write their personal info and that information is stored in firebase. Then, in my navigation drawer, I have an activity, called “AccountActivity”, where the user cand see their personal info saved

How can i delete firebase child node with the same name?Get the key to be delited from one node and delete those node with same key from the other

I want to delete all the child nodes form different nodes with the same names. I used the following code to get the keys of the child nodes to be deleted and pass it to the other node but it is deleting them from both nodes(completedSurveys and surveyList). Attached below is the firebase realtime database structure. Answer It could be

Updating Firebase Authentication password using user.reauthenticate

To update a user’s password in Firebase Authentication you must re-authenticate : https://firebase.google.com/docs/reference/android/com/google/firebase/auth/FirebaseUser#reauthenticate(com.google.firebase.auth.AuthCredential) Yet this function does not seem to double check if the currentPassword is correct before actually re-authenticating. I believe this may be because Firebase does not require re-authentication until after a set period of time, and will bypass this if it is still within that timeframe. Here’s

Advertisement