firebase-realtime-database

how to summarize values in firebase database #AskFirebase

烈酒焚心 提交于 2020-01-06 18:13:01
问题 I have to summarize values in firebase database. Note: this is a simplified non real project to make it easier to explain. So apologize if the JSON data has an error. It is for demonstration purposes and I will adjust to my real needs. Full project description with real data is here: best practize summarize FirebaseDatabase values, but seems too specific. Assuming I collect weight data for multiple cars, every time they are on the scale. So some sample data could look like: weightTable{

how to summarize values in firebase database #AskFirebase

血红的双手。 提交于 2020-01-06 18:10:05
问题 I have to summarize values in firebase database. Note: this is a simplified non real project to make it easier to explain. So apologize if the JSON data has an error. It is for demonstration purposes and I will adjust to my real needs. Full project description with real data is here: best practize summarize FirebaseDatabase values, but seems too specific. Assuming I collect weight data for multiple cars, every time they are on the scale. So some sample data could look like: weightTable{

How to remove currently selected item in ListView that works with FirebaseListAdapter?

旧时模样 提交于 2020-01-06 17:47:39
问题 I am developing an Android app, and I have already implemented authentication with Firebase. After logging in, in my NavigationDrawerActivity I have a ListView that I had set a FirebaseListAdapater to that gets user specific data. In my onCreate() method I have the following: firebaseAuth = FirebaseAuth.getInstance(); FirebaseUser localUser = firebaseAuth.getCurrentUser(); String localUserEmail = localUser.getEmail(); String localUserEmailUniqueID = getEmailAddressUniqueID(localUserEmail);

Firebase database data retrieving -Java

老子叫甜甜 提交于 2020-01-06 16:21:37
问题 Here is my DB structure: Code which I used for data reading: user="hrcj7"; mDatabase = FirebaseDatabase.getInstance().getReference().child("User"); Query phoneQuery = mDatabase.orderByChild(user); phoneQuery.addChildEventListener(new ChildEventListener() { @Override public void onChildAdded(DataSnapshot dataSnapshot, String prevChildKey) { User dinosaur = dataSnapshot.getValue(User.class); System.out.println(dataSnapshot.getKey() + " was " + dinosaur.getEmail() + " meters tall."); } @Override

Data not getting saved in Firebase database from android

淺唱寂寞╮ 提交于 2020-01-06 16:21:25
问题 I am using the new Firebase console. I am trying to save an object to the database but its not getting saved. Following is the code. DatabaseReference mFirebaseRef = FirebaseDatabase.getInstance().getReference(); mFirebaseRef.push().setValue(object, new DatabaseReference.CompletionListener() { @Override public void onComplete(DatabaseError databaseError, DatabaseReference reference) { if (databaseError != null) { Log.e(TAG, "Failed to write message", databaseError.toException()); } } }); the

Firebase database data retrieving -Java

守給你的承諾、 提交于 2020-01-06 16:21:13
问题 Here is my DB structure: Code which I used for data reading: user="hrcj7"; mDatabase = FirebaseDatabase.getInstance().getReference().child("User"); Query phoneQuery = mDatabase.orderByChild(user); phoneQuery.addChildEventListener(new ChildEventListener() { @Override public void onChildAdded(DataSnapshot dataSnapshot, String prevChildKey) { User dinosaur = dataSnapshot.getValue(User.class); System.out.println(dataSnapshot.getKey() + " was " + dinosaur.getEmail() + " meters tall."); } @Override

Data not getting saved in Firebase database from android

柔情痞子 提交于 2020-01-06 16:18:33
问题 I am using the new Firebase console. I am trying to save an object to the database but its not getting saved. Following is the code. DatabaseReference mFirebaseRef = FirebaseDatabase.getInstance().getReference(); mFirebaseRef.push().setValue(object, new DatabaseReference.CompletionListener() { @Override public void onComplete(DatabaseError databaseError, DatabaseReference reference) { if (databaseError != null) { Log.e(TAG, "Failed to write message", databaseError.toException()); } } }); the

C# Firebase Restful Post generate unique key

旧城冷巷雨未停 提交于 2020-01-06 14:48:29
问题 Below is my code that i used to do a POST request to firebase database. What can i do, to allow the subsequence POST request to be in ascending order? I do not want the firebase auto generated unique ID. Example can be viewed here. enter image description here public void postEachFirebaseMessage(string dbcolName) { var json = Newtonsoft.Json.JsonConvert.SerializeObject(new { user = "UserNameValue", message = "MessageValue", }); var request = WebRequest.CreateHttp(@"" + config.BasePath +

C# Firebase Restful Post generate unique key

南楼画角 提交于 2020-01-06 14:48:14
问题 Below is my code that i used to do a POST request to firebase database. What can i do, to allow the subsequence POST request to be in ascending order? I do not want the firebase auto generated unique ID. Example can be viewed here. enter image description here public void postEachFirebaseMessage(string dbcolName) { var json = Newtonsoft.Json.JsonConvert.SerializeObject(new { user = "UserNameValue", message = "MessageValue", }); var request = WebRequest.CreateHttp(@"" + config.BasePath +

Gathering data from Firebase asynchronously: when is the data-set complete?

断了今生、忘了曾经 提交于 2020-01-06 14:47:52
问题 in a Firebase Android app that I'm currently developing I would like to provide an export feature. This feature should allow the user to export a set of data that is stored in Firebase. My plan is to gather all required data into a intermediate object (datastructure) that can be (re-)used for multiple export types. I am running into the issue that because of the flat Firebase data structure that I am using (as explained in https://www.firebase.com/docs/android/guide/structuring-data.html), it