firebase-realtime-database

Change in firebase doesn't refresh table - Tables not displaying user nodes from arrays

℡╲_俬逩灬. 提交于 2021-02-05 11:55:54
问题 I am trying to have two arrays, used as dataSources for two tableViews. One array contains user type: macro and the other array contains user type: micro. If a user type is changed from macro to micro (and vice-versa) I want to remove the user from one table and add it to the other. Currently I am able to update the user's tag if changed in Firebase Database and have it appear in the proper array when the app is restarted. The observe function only collects it once and if it is changed, it

How to get firebase real-time database usage programmatically

假装没事ソ 提交于 2021-02-05 11:42:33
问题 Is there any API available for getting real-time database usage. We need to show usage and related info on our dashboard and my client don't want to visite firebase consol and option for the upgrade or downgrade plan programmatically 回答1: There is currently no API for this. You may file a feature request here. 来源: https://stackoverflow.com/questions/52620717/how-to-get-firebase-real-time-database-usage-programmatically

Data from ES6 promise doesn't render on the page until I click on it?

孤街浪徒 提交于 2021-02-05 11:27:27
问题 I an using Ionic for my app with a connection to Firebase to pull data. I created a promise in a factory to pull data down and thought it should render the data on the screen once it finishes but I'm getting nothing until I touch the screen? I get no error and the data does indeed come. Factory: all: function () { return new Promise ((resolve, reject) => { firebase.database().ref('desks').once('value').then(snapshot => { let desks = [] snapshot.forEach((child) => { desks.push(child.val()); })

I can't update data from firebase because of the random given character

こ雲淡風輕ζ 提交于 2021-02-05 11:19:26
问题 Here is my firebase i don't know how to enter or get that path in firebase and i want to change the password inside that random character 回答1: To update a specific value in the database, you must know the full path to that value. If you know the email address, but not the key that email address, you can use a query to look up all child nodes of users with that email address. let query = firebase.database.ref("users").orderByChild("email").equalTo("gagfa@john.com"); Then you can load the data

Retrieve multiple filters in Firebase [Swift]

早过忘川 提交于 2021-02-05 11:17:36
问题 Is there a way to quickly pull all the userId that has the same username? For example, if userId_002 also had the username "sean", can I quickly retrieve ["userId_001","userId_002"]? I appreciate any help! I'm trying this but doesn't work: let results = Database.database().reference().child("usernames").queryOrdered(byChild: "username").queryEqual(toValue: "sean") results.observeSingleEvent(of: .value, with: { (snapshot) in for child in snapshot.children { let value = child as! DataSnapshot

Cannot retrieve data in ascending order

一世执手 提交于 2021-02-05 10:46:07
问题 I want to retrieve data in ascending order, but received data somehow added to recyclerview in descending order. Firebase Database: What I am doing: DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference().child("/Teacher"); Query query = mDatabase.orderByChild("rating"); FirebaseRecyclerOptions<Teacher> options = new FirebaseRecyclerOptions.Builder<Teacher>() .setQuery(query, Teacher.class) .build(); FirebaseRecyclerAdapter adapter = new FirebaseRecyclerAdapter<Teacher,

Append a string to a list on Firebase Realtime Database [duplicate]

▼魔方 西西 提交于 2021-02-05 09:30:39
问题 This question already has an answer here : How to create auto incremented key in Firebase? (1 answer) Closed 2 years ago . I want to append a String to my List on the Firebase Realtime Database. (My code already works but there is a problem) So the Database looks like this: message: 0: "some string" 1: "another string" 2: "some string" But I think the problem with this code would be, that if somebody reads the numbers of messages and then wants to write a message there would be a problem,

Append a string to a list on Firebase Realtime Database [duplicate]

怎甘沉沦 提交于 2021-02-05 09:30:36
问题 This question already has an answer here : How to create auto incremented key in Firebase? (1 answer) Closed 2 years ago . I want to append a String to my List on the Firebase Realtime Database. (My code already works but there is a problem) So the Database looks like this: message: 0: "some string" 1: "another string" 2: "some string" But I think the problem with this code would be, that if somebody reads the numbers of messages and then wants to write a message there would be a problem,

Firebase searching with list of data

本小妞迷上赌 提交于 2021-02-05 09:26:54
问题 Assuming I have a list of data I would like to store with Firebase realtime database, and search it later. What would be the best way to store the data and query it to get the best performance? My data is a list of names (containing a lot of names). ["Bob", "Rob", ...] Note that I have multiple clients searching in a given time. 回答1: If the names are supposed to be unique and order doesn't matter, you'll want to store them as a mathematical set. In the Firebase Realtime Database you'll model

Retrieve Data from Realtime Database with Action Callback

痴心易碎 提交于 2021-02-05 09:26:27
问题 I am trying to receive the JSON value from the Realtime Database of Firebase using Unity. I do the following: FirebaseDatabase.DefaultInstance .GetReference("Leaders").OrderByChild("score").GetValueAsync().ContinueWith(task => { if (task.IsFaulted) { Debug.LogError("error in reading LeaderBoard"); return; } else if (task.IsCompleted) { Debug.Log("Received values for Leaders."); string JsonLeaderBaord = task.Result.GetRawJsonValue(); callback(JsonLeaderBaord); } } }); Trying to Read the