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

Convert Firebase stored "array" object to POJO

I am trying to retrieve data from firebase in a recyclerview in my android application. The object at the "boardz" node I am referencing has 2 child properties. Those properties each have multiple child properties. Updated with Firebase json and…
5
votes
2 answers

Remove object from Firebase using AngularFire 2

I am trying to create a delete function that will get the delete my object from the Firebase. I have the following structure on FireBase: recipes recipebooks recipesPerRecipebook - id - id - recipebook_id - id -…
Daimz
  • 3,243
  • 14
  • 49
  • 76
5
votes
1 answer

Android Firebase Database : Single data fetch without event listener

Right now, following is my database hierarchy in Firebase Database console. I am using following code to enter data into firebase database. public void createRecordInDB(PlaceListItem placeListItem) { mDB=…
Manish Dubey
  • 4,206
  • 8
  • 36
  • 65
5
votes
1 answer

Firebase listener need to always be removed?

If I use listener in activity in the following manner: // Read from the database myRef.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { // This method is called once…
yotam hadas
  • 702
  • 3
  • 14
5
votes
1 answer

Firebase: Database write before sign in

I am using Firebase in my android app. My purpose is that the a user of the application should be able to write data to the database but I don't want the user to sign up so i am using anonymous sign in. I have a form that the user can submit and…
5
votes
2 answers

Firebase Accessing Snapshot Value Error in Swift 3

I recently upgraded to swift 3 and have been getting an error when trying to access certain things from a snapshot observe event value. My code: ref.child("users").child(userID!).observeSingleEvent(of: .value, with: { (snapshot) in let username…
Rohan Vasishth
  • 417
  • 6
  • 19
5
votes
2 answers

Regarding the new Firebase SDK for Unity and Threading Tasks

I have a more general question regarding Unity C# and the brand new Firebase SDK. I've looked through all of the new documentation and haven't seen an answer to this yet. If you retrieve data from the database below, it doesn't allow you to execute…
5
votes
1 answer

Firebase CLI: database:set keeps complaining about 'Path must begin with /'

According to the CLI docs and its own help command, I just need to pass it the path (which I assume is the path on the project), my json file, and any options. So this is what I do (while I'm in the folder containing the json data): firebase…
IronWaffleMan
  • 2,513
  • 5
  • 30
  • 59
5
votes
1 answer

Differences between 'child_added' and 'value' firebase?

I am seeing a tad difference between child_added and value when returning data in firebase. Using value I can test to see if snapshot.val() has returned something or not using it like this: Fetching Data: ref.orderByChild('appUserName') …
Chipe
  • 4,641
  • 10
  • 36
  • 64
5
votes
0 answers

Show progress bar while loading list Firebase

I would like to show a progress bar on my screen while I seek a listing in Firebase. How can I do this? The code as it is now does not show the progress bar. If you can help me, thank you. @Override protected void onResume() { …
5
votes
2 answers

How to create a custom short unique-id in Firebase-Database with many active users

My application is a game where I need each user to be able to create a unique, natural number ID code that can be bijectively converted to a "short string" the same way a url-shortener works. The "short string" part is very important to the game. I…
5
votes
1 answer

applicationReceivedRemoteMessage only executes in foreground

my project uses Firebase Notifications as its APNs service, but I have been using the Firebase Console to send notifications to my device as a test, and they only show up (through Console Output) in the foreground. When the app is in the background…
5
votes
1 answer

Firebase rules to allow some user access

I would like only user2, user3 to view user1's info from DB and not user 4. I know I need to do something in the JSON rules: THE UIDUser2, UIDUser3 Would be replaced with the actual ID's when User1 allowed permission via the app. { "rules": { …
5
votes
1 answer

Is it possible to reverse a Firebase list?

I've read every question on SO about this and I still haven't found an answer to this. So don't mark this as a duplicate. I'm using AngularFire with Angular 2 and Typescript. I'm using FirebaseListObservable to pull a list of the 24 most recent…
5
votes
2 answers

Search by array values in Firebase

I use Firebase via REST API. I have following database structure: { "categories" : { "Cat1" : {}, "Cat2" : {}, "Cat3" : {}, "Cat4" : {} }, "items" : { "item1" : { "categories": ["Cat1", "Cat3"] }, "item2" :…
Ildar
  • 55
  • 1
  • 5