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
1 answer

is there a way to authenticate user role in firebase storage rules?

I am trying to restrict firebase storage based on user role. Database: users admin=false ... ... ... I am trying to use the following kind of rule in firebase…
5
votes
3 answers

Firebase connection with codeigniter in php

I want to connect firebase database with my codeigniter project in php. I not able to find the exact solution and library.. Please recommend the correct library with correct steps that I should follow to connect. Thanks in advance.
5
votes
1 answer

Is there a way to increment a count in Firebase without exposing current count to the client?

I would like to increment a count in Firebase, but without exposing the the current count to client. I have read numerous helpful answers about using transactions to increment counters in Firebase, but all of these assume that the client has "read"…
Mark Carey
  • 73
  • 5
5
votes
1 answer

Firebase Web retrieve data

I have the following db structure in firebase I'm trying to grab data that belongs to a specific user id (uid). The documentation has the following example: firebase.database().ref('/users/' + userId).once('value').then(function(snapshot) { var…
CyberJunkie
  • 21,596
  • 59
  • 148
  • 215
5
votes
3 answers

How to structure friendship data with firebase?

I'm novice with firebase and I try to structure my data to store friendship between users of my app. My data are structured like this : { users: { user_1: { name: John }, user_2: { name: Jack …
aurevec
  • 53
  • 1
  • 7
5
votes
1 answer

Firebase - Sometimes value is not saving

Take a look at this GIF I recorded: This is the database of a counter app I'm making. When a user increments, count gets added along with the count under users:{ UID:{ count: x } } However, if you can notice in the GIF, sometimes, the…
Ali Bdeir
  • 4,151
  • 10
  • 57
  • 117
5
votes
1 answer

Firebase database - run on different thread

I want to run the events of firebase on different thread. On the last version of firebase I had this code that did it Config firebaseConfig = new Config(); firebaseConfig.setEventTarget(new EventTarget() { ExecutorService executor =…
Alon
  • 2,919
  • 6
  • 27
  • 47
5
votes
1 answer

firebase query on the second/third level

I am using Javascript with Firebase and I want to make a query on a value exist on the second or the third level, My DB is like that : Users : -KNwBd5cF6iY9dWh0eFd : name: "Jon Snow" phones: …
Morad Edwar
  • 1,030
  • 2
  • 11
  • 27
5
votes
3 answers

How to store data in realtime database in firebase during user registration?

I'm making socialmedia-like app that has user profile. I want to save their profile data upon their registration using their uid. Although the registration is successful, profile is not saving in the firebase database. I've also checked the rules,…
5
votes
0 answers

Firebase database rules comparing key

I know that to compare with a keys value you would use key.val() === something. How would I compare the key of the new data being written to something, not the value but the key.
MarksCode
  • 8,074
  • 15
  • 64
  • 133
5
votes
2 answers

No setter/field for while trying to populate a listview on firebase

I am trying to retrieve data from firebase and display it on my listview using firebase-ui. The code runs fine but nothing is displayed on the list view. This is what I get from my logs: W/ClassMapper: No setter/field for -KNRXdDOlA9nV6qxXvOl found…
5
votes
4 answers

Process timeout | Amazon Lambda to Firebase

i've written code in node.js and my data is on Firebase. The problem i'm facing is that my code never exits. I've done it like this one Link The problem is that firebase referance/listener never become null and therefore my function never exits. I…
5
votes
1 answer

Best practice for friend-adding system with Firebase?

I'm trying to think of the best way to structure a database to allow users to send/accept/decline users as friends. I've currently got a system that allows users to search through users, checks all the necessary stuff like people already being on…
J.Doe
  • 377
  • 3
  • 15
5
votes
1 answer

How to not generate unique ID when using push method in Firebase?

I'm trying to push new data into Firebase but it keeps generating an unique ID and an extra child node for me. How can I stop generating the ID and extra node or is there another way to push data into Firbase? My dataset is given and I just need to…
ethan852
  • 337
  • 6
  • 13
5
votes
2 answers

Not a direct subclass of GenericTypeIndicator: class com.google.firebase.database.GenericTypeIndicator

I have Firebase App with Realtime Database, I have db.json as { "brs" : { "route": [ { "routeDestination": "DDDD1", "routeOrigin": "OOOO1", "bus" : { "busArrivalTime" : "created_at_timestamp", …
Arshad Ali
  • 3,082
  • 12
  • 56
  • 99