Questions tagged [firebase-realtime-database]

Firebase Realtime Database is a cloud hosted, NoSQL, JSON database that provides offline caching and synchronization. Do NOT use this tag for questions about Cloud Firestore; instead use the [google-cloud-firestore] tag.

About Firebase Realtime Database

Firebase Realtime Database is a component of the Firebase suite of tools for cross-platform application development.

  • Intuitive and easy-to-use API
  • Remains responsive regardless of network latency or Internet connectivity so your Firebase app works offline. Data synchronizes when connectivity returns
  • Handles the complexity of realtime synchronization and provides flexible conflict resolution
  • Accessible directly from client SDKs, or from your server with the REST API

To learn more: Firebase Realtime Database for SQL Developers (video series)

Related tags

40037 questions
5
votes
3 answers

How do I loop through and get all the keys of the nested nodes in firebase?

I am trying to get the keys of the nested nodes in Firebase and I am not sure how to do this. For example in this case: example How do I know that 2,3,4 exist within 1? I am thinking of putting a values in a list seperately in firebase. But is…
ndduong
  • 429
  • 9
  • 21
5
votes
1 answer

Firebase/Android - Regularly losing database connection

I followed the docs for Firebase Auth and Database. Everything works fine after a fresh install: The user can register or log in, the data is retrieved like it should, written like it should, super fast, super clean. yay. And then, after a few…
Barthy
  • 3,151
  • 1
  • 25
  • 42
5
votes
1 answer

Adding items to Firebase array in Swift without observing for array first

Currently I add a new post to my Firebase array by observing for the array first, appending my new post, and then updating the ref: REF_USER.child(UID).observeSingleEventOfType(.Value, withBlock: { snapshot in if !snapshot.exists() {return} if…
leonardloo
  • 1,753
  • 3
  • 20
  • 31
5
votes
3 answers

Firebase database getInstance crashes app

When running the sample after creating google-service.json, the app crashes when trying to get database reference in SignInActivity mDatabase = FirebaseDatabase.getInstance().getReference(); Crash log 05-21 09:27:27.644…
Vihaan Verma
  • 12,815
  • 19
  • 97
  • 126
5
votes
0 answers

Delete Firebase Data after set time, regardless of app termination

I am trying to allow my users to set an expiration timer (up to 2 hours) for data stored in Firebase. The data needs to be deleted once the timer expires, but I've been having trouble finding a solution that will accomplish this even if the app is…
Julian Lee
  • 293
  • 1
  • 11
5
votes
1 answer

Firebase is giving "maxretry" error

We're using Firebase as a backend for our mobile app. Some of our users have sporadically received an error "maxretry" with a transaction writing to a path with single numeric value. We don't have multiple users or connections, nor multiple writes…
aliz_bazar
  • 272
  • 1
  • 2
  • 14
5
votes
1 answer

Truncated Logcat Exception Message

I'm trying to debug an android app error (in AS2.1beta3) but the logcat message seems to be truncated at the point where it would give me the info on what caused the problem. Error message: com.firebase.client.FirebaseException: Failed to bounce to…
doovers
  • 8,545
  • 10
  • 42
  • 70
5
votes
2 answers

Understanding if data exists in Firebase

I am using the following to fetch a username from Firebase. But in this case, how do I get to know, if the username exists or not. Firebase firebaseRef = new Firebase("/Users"); Query…
Arun George
  • 1,167
  • 3
  • 15
  • 29
5
votes
4 answers

How to deal with [NSDate] and Firebase

I am making a calendar app. I have one array of selected dates. User selected it previously and they are stored there. var selectedDays = [NSDate]() When app loads I have to display these dates, but everything is overcomplicated because Firebase…
Kira
  • 1,575
  • 4
  • 26
  • 48
5
votes
3 answers

How to remove items from firebase RecyclerView

I'm currently working on Adding Friends with the help of firebase RecyclerView in which if a user tap on ADD button, he is added in database n that tapped item is needed to be removed permanently.. so, how to achieve it through firebase model as we…
5
votes
1 answer

How to check if firebase query is empty

I want to delete the data from Firebase before unauthorizing. The problem is that mFirebaseRef.unauth() works only if query is not empty. But I need it to work even if query is empty. final Firebase pushNotificationRef = new…
PerSpiKyliaTor
  • 91
  • 1
  • 1
  • 7
5
votes
1 answer

Firebase runTransaction not working - MutableData is null

I am trying to use runTransaction() of Firebase database but it is not working. Here is the code I am using. numQuestionRef.runTransaction(new Transaction.Handler() { @Override public Transaction.Result doTransaction(MutableData mutableData)…
5
votes
1 answer

Firebase deep querying

This question is about implementing firebase deep querying. Consider the following structure in firebase: Here, my ref is pointing to the root of the structure which is /messages. So I have : var ref = new…
Rohan Dalvi
  • 1,215
  • 1
  • 16
  • 38
5
votes
2 answers

Proguard configuration for Firebase-UI library

When creating a APK with proguard enabled, the following exception is thrown when using the FirebaseRecyclerAdapter from the Firebase-UI library (com.firebaseui:firebase-ui:0.3.0): java.lang.RuntimeException: java.lang.NoSuchMethodException:
5
votes
1 answer

Firebase-Android, Fail to save data after long time idle

This question is relative to this issue Firebase-Android, How to sync data when resume after connection lost? Step-by-step is: First I login using email method in Auth Activity In Timeline activity I add an record. Everything looks good. But if I…