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

JsonMappingException: No suitable constructor found

I am implementing a firebase example as given in their documentations. I am facing this error: com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class com.XYZ.$BlogPost]: can not instantiate…
gautamprajapati
  • 2,055
  • 5
  • 16
  • 31
5
votes
2 answers

How to define an index using the new bolt compiler for Firebase

I'm using the new bolt compiler (introduced here: https://www.firebase.com/blog/2015-11-09-introducing-the-bolt-compiler.html) I have the need to define an index on the owner field of my type Event: type Event { description : String | Null, …
Peter
  • 10,910
  • 3
  • 35
  • 68
5
votes
1 answer

Security Rules: checking for null auth

For each security rule, is it necessary to always check auth !== null? It seems redundant to have to do this for every child rule. I checked Firebase's own Firechat security rules and the enforcement is not consistent at all. There are rules that…
5
votes
1 answer

Firebase where to call addChildEventListener so that I can save bandwidth?

With my test android app I am trying to calculate how much bandwidth it will take if my user add a child every 10sec or 1min and synced with 5 devices. My app users will create data every minute, so I have to calculate subscription cost for each…
Shivaraj Patil
  • 8,186
  • 4
  • 29
  • 56
5
votes
2 answers

Is there a way to version objects in Firebase that are meant to be read-only?

I am working on an app that will be cross-platform: web, android, iOS. I have a couple objects that are intended to specify some constants, like valid states. For example: { "states": { "VALID": 0, "INVALID": 1 } } Now I've…
prodaea
  • 1,720
  • 1
  • 14
  • 20
5
votes
2 answers

I want to set a calculated priority using the server timestamp provided by Firebase

I would like to set the priority of a child using the server time stamp provided by Firebase, ServerValue.TIMESTAMP: mFirebaseref.child(userid).setPriority(ServerValue.TIMESTAMP); But my case is inverse. I want to set negative ServerValue.TIMESTAMP…
sivaram636
  • 419
  • 3
  • 14
5
votes
0 answers

Firebase one to one chat

I am building a simple chat application in android with Firebase as backend. ref3.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(DataSnapshot snapshot) { Map
5
votes
3 answers

How to populate Android ListView with information from Firebase query

This is my first post so if I didn't follow some protocol I was supposed to, apologies. I am trying to populate a ListView with some information from my Firebase database. I think the problem I am having is that the query to the database is too slow…
5
votes
4 answers

Firebase how to prevent duplicate entries atomically

I'm looking at using firebase as a data store for user data for a web app. My current thought is to store each user's data using the timestamp of when they joined as the key referencing that user's data. The advantage of this scheme is that it's a…
Retsam
  • 30,909
  • 11
  • 68
  • 90
4
votes
1 answer

How to create a secure like counter in Firebase Realtime Database

I've got a user node with in my database that stores any info about the user. Then in my app I have to image buttons: mlike = root.findViewById(R.id.btn_like); mdislike = root.findViewById(R.id.btn_dislike); mlike.setOnClickListener(new…
markharrop
  • 866
  • 1
  • 9
  • 30
4
votes
3 answers

Flutter Firebase Database not working on release after publish in Google play

Flutter Firebase Database not working on release after publish in Google play and Firebase Auth working fine . I have added the SHA from Google play console to firebase console I have no problems when running on debug mode
4
votes
1 answer

Firebase Web get in realtime database throwing error though path is correct

import section: ... import { ref, getDownloadURL, deleteObject } from "firebase/storage"; import { child, get } from "firebase/database"; ... This is the code: function getDirectLink() { console.log(realtimeDatabase) try { …
Shourya Shikhar
  • 1,342
  • 1
  • 11
  • 29
4
votes
1 answer

how to delete firebase realtime database child node with key?

When I try to run the code below I get an error and I'm not sure why. confirmDelete(e) { const db = getDatabase(); db.ref("/ships/" + e.target.id).remove(); }, If I log the e.target.id I get the exact same as the shipKey in the code…
4
votes
1 answer

Flutter Google Sign In super slow on Android

I am currently testing my Flutter app on my Android Device. I have added sign in with Google using Firebase. On iOS everything works just fine, and also Android Emulators works good. On my physical Samsung Device however, things are not as smooth. I…
El_Loco
  • 1,716
  • 4
  • 20
  • 35
4
votes
1 answer

Flutter Provider - StreamProvider depending on another StreamProvider

TLDR How to use data from one stream provider to call another? Background of the Problem Hello! I have this Firebase Realtime Database Structure Each user's Group IDs are stored here. They can be accessed to then query the following 'Groups' Json…
1 2 3
99
100