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
0 answers

Firebase addValueEventListener not being triggered

I've been having trouble the last week or so retrieving data from my Firebase database. I've searched all over StackOverflow and google for the answer to this and either I'm not understanding the solutions being presented or they simply aren't…
Vell
  • 391
  • 2
  • 9
5
votes
2 answers

Firebase retrieve all data on app start

I have trouble finding any information using firebase documentation and google on how to retrieve all data on app start. Let's assume, I want to get all the following data on app start without any event. and store in a ArrayList. Let's say…
Isuru
  • 3,818
  • 13
  • 49
  • 64
5
votes
2 answers

Viewing JSON data from Firebase in excel?

I'm using Firebase as it seems to be the simplest database solution for Android. I'm just playing around with it to get a bit of a feel for it. The biggest thing confusing me right now though is how (if possible) you could represent the database in…
jontycg
  • 327
  • 2
  • 16
5
votes
1 answer

How to retrieve data synchronously from Firebase?

I have two collections namely, Users and Questions. Based on the user logged in using userId, I retrieve the currQuestion value from users collection. Based on the currQuestion value, I need to retrieve the question document from Firebase Questions…
Spark
  • 371
  • 6
  • 15
5
votes
3 answers

How to retrieve posts that are within 0.5 kms of my reach?

I am saving the coordinates of the post posted by the users. I'm generating a push id and then using it to save both the data of the post and the geofire coordinates. I want to show only those posts which are within 0.5 kms radius of them. I am…
Hammad Nasir
  • 2,889
  • 7
  • 52
  • 133
5
votes
1 answer

Robolectric app testing with Firebase

I'm trying to write a simple Robolectric test for my presenter, which uses the Firebase Database and Firebase Auth. But every time I'm trying to start the test, it throwes an IllegalStateException. java.lang.IllegalStateException: FirebaseApp with…
5
votes
0 answers

Firebase dataSnapshot retrieving old nonexistent node

I was playing with Firebase, removing and adding users. Then I decided to delete all my users and now I still can access nodes that doesn't exist anymore. Below is how I'm retrieving the dataSnapshot and a print from my most recent Firebase…
Douglas Pfeifer
  • 147
  • 1
  • 8
5
votes
1 answer

Add on touch listener for Firebase RecyclerView

I tried to add an "on touch" listener to recyclerview with firebase but couldn't do it successfully. Can anyone help me? DatabaseReference ref = FirebaseDatabase.getInstance().getReference(); DatabaseReference a =…
5
votes
1 answer

Timestamp in Firebase Simulator not allowed (.) dot

there's a JSON field called createdTime, its value is the Server's current timestamp (look like this {".sv":"timestamp"}), but the simulator doesn't allow having "." (dot) in field names. What should I do to simulate that?
5
votes
4 answers

How to know the random id given to a firebase data

My problem is that I can't retrieve the random key generated by Firebase when saving data (I'm obliged to use that random key), for example I tried to use dataSnapshot.getKey(), but it didn't work,any help will be highly appreciated. Thanks in…
TeachMePls
  • 197
  • 1
  • 2
  • 11
5
votes
1 answer

accessing email address in firebase rules

I'm using firebase 3. When writing firebase rules, the auth object only contains the uid and the provider. Is there any way that this could be enhanced to also provide the email address? The problem that I'm trying to solve is that the owner of the…
5
votes
2 answers

How to set Firebase Database rules? How to prevent .write from deleted user

Introduction I am building a firebase web client app. I would like set Firebase Database rules. New user registered to a firebase app. Firebase gave him a user.UID. Then, admin delete OR disabled the user from firebase admin console. User refresh…
5
votes
2 answers

Joining flattened data from Firebase Realtime Database using RxJava

Joining flattened data is a common use case also described in the documentation. But the documentation shows a simple example which is not real-time, it doesn't react to changes. I'm looking for a more robust implementation. I think RxJava is ideal…
David Vávra
  • 18,446
  • 7
  • 48
  • 56
5
votes
1 answer

In Firebase whats the difference between push and childByAutoId

In Firebase if I'd like to create a child node with a unique ID it appears I have two options: Push() : Use the push() method to append data to a list in multiuser applications. The push() method generates a unique ID every time a new child is…
7hacker
  • 1,928
  • 3
  • 19
  • 32
5
votes
1 answer

Firebase realtime database rules (all can read but edit only owner)

So far I've been using this rules configuration { "rules": { "items": { ".read" : true, "$uid": { ".read" : true, ".write": "auth != null && auth.uid == $uid" } } } } validation and other directories…
toasty
  • 142
  • 1
  • 1
  • 10