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
97
votes
10 answers

How do I get the server timestamp in Cloud Functions for Firebase?

I know you can pull the server timestamp in web, ios, and android - but what about the new Cloud Functions for Firebase? I can't figure out how to get the server timestamp there? Use case is me wanting to timestamp an email when it arrives. On web…
97
votes
7 answers

What would be the AWS equivalent to Firebase Realtime Database?

I'm working on a new game project at the moment that will consist of a React Native front-end and a Lambda-based back-end. The app requires some real time features such as active user records, geofencing, etc. I was looking at Firebase's Realtime…
88
votes
23 answers

Firebase TIMESTAMP to date and Time

I am using firebase for my chat application. In chat object I am adding time stamp using Firebase.ServerValue.TIMESTAMP method. I need to show the message received time in my chat application using this Time stamp . if it's current time i need to…
Kichu
  • 1,641
  • 4
  • 21
  • 28
85
votes
11 answers

How to hide an item from Recycler View on a particular condition?

I am using Firebase Recycler Adapter (Firebase UI Library) to populate Recycler View. I want to hide an item(row) on a condition. I have a LinearLayout containing a recycler view. I set linear layout visibility to Gone in populateViewHolder()…
83
votes
5 answers

Closure cannot implicitly capture a mutating self parameter

I am using Firebase to observe event and then setting an image inside completion handler FirebaseRef.observeSingleEvent(of: .value, with: { (snapshot) in if let _ = snapshot.value as? NSNull { self.img =…
coding_999
  • 833
  • 1
  • 6
  • 4
83
votes
2 answers

Where can I get "serviceAccountCredentials.json" for Firebase Admin?

Here is said what I need to set up Firebase on java: FirebaseOptions options = new FirebaseOptions.Builder() .setDatabaseUrl("https://databaseName.firebaseio.com") .setServiceAccount(new…
82
votes
5 answers

Firebase & GraphQL

Does anyone have any experience with GraphQL and Firebase? I figure one would place the firebase calls in the resolver of the relevant field, passing some variable from the props of the component into the arguments of the query. How can we insert…
omgj
  • 1,369
  • 3
  • 12
  • 18
81
votes
9 answers

firebase.database is not a function

I am trying to upgrade from earlier firebase version to the latest in my ionic project. I followed this tutorial for upgrade. In step 4 from this page I am stuck on the last statement firebase.database().ref();. Error message TypeError:…
80
votes
1 answer

Firebase query if child of child contains a value

The structure of the table is: chats --> randomId -->--> participants -->-->--> 0: 'name1' -->-->--> 1: 'name2' -->--> chatItems etc What I am trying to do is query the chats table to find all the chats that hold a participant by a passed in…
79
votes
19 answers

How to extract a list of objects from Firebase DataSnapshot on android

I want to convert all Firebase DataSnapshot children to a list in android. Something like this: mFirebaseRef = new Firebase(FIREBASE_URL); mFirebaseRef.addValueEventListener(new ValueEventListener() { @Override public void…
Parth Vyas
  • 807
  • 1
  • 6
  • 3
75
votes
3 answers

Is there any UI Console where I can query the Firebase Database?

Is there any UI Console where I can query the Firebase Database?? Basically I wish to query the data just like we can query other databases using UI
mohan mishra
  • 1,158
  • 2
  • 14
  • 21
72
votes
15 answers

Getting Exception java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions after updating to the new firebase

I have updated my application to the new firebase using the this and now when i compile my project i get the following exception. Here is my logcat: 11:57:54.533 27844-27844/com.example.dayshift_2.traveyy E/AndroidRuntime: FATAL EXCEPTION:…
M.Waqas Pervez
  • 2,492
  • 2
  • 19
  • 33
70
votes
11 answers

How to do a simple search in string in Firebase database?

I want to create a simple search in my app, but cannot find anything on interwebs about it, that's more recent than 2014. There must be a better way. There are startAt and endAt functions but they don't work as expected and are case sensitive. How…
Zigmārs Dzērve
  • 1,451
  • 2
  • 14
  • 19
66
votes
3 answers

Firebase search by child value

I have the following structure on my Firebase database: I would like to search for a user by name, last name or email but as I don't have the user key in the level above I don't know how I can achieve this. I'm doing and administrator session so it…
Barbara Brina
  • 663
  • 1
  • 5
  • 5
66
votes
4 answers

Firebase Offline Capabilities and addListenerForSingleValueEvent

Whenever I use addListenerForSingleValueEvent with setPersistenceEnabled(true), I only manage to get a local offline copy of DataSnapshot and NOT the updated DataSnapshot from the server. However, if I use addValueEventListener with…
Jason Hoch
  • 805
  • 1
  • 7
  • 7