firebase-realtime-database

Polymer + Firebase (Polymerfire): Cannot read property 'push' of undefined': 'this.$.query.ref.push(…)'

[亡魂溺海] 提交于 2020-01-28 10:14:11
问题 I'm following a Polymer + Firebase tutorial video using the Polymer App Tool Kit (initiated with the polymer CLI). When I try to push data to a Firebase collection, I get the following error: Cannot read property 'push' of undefined' Here's my code (firebase app is initiated in my-app.html with name "firebase-app"): <dom-module id="add-model"> <!-- Defines the element's style and local DOM --> <template> <firebase-auth user="{{user}}" app-name="firebase-app"></firebase-auth> <firebase-query

Android: Retrieve data of a specific user from a Firebase database

試著忘記壹切 提交于 2020-01-28 08:08:58
问题 I am trying to read "specific" data from my firebase realtime database. I have seen examples of getting all data from a table and going through it to find the data record you want, but that is definitly not a recommended safe practice. Below is how I save my data private void saveInDatabase(String email) { // Write a message to the database FirebaseDatabase database = FirebaseDatabase.getInstance(); DatabaseReference myRef = database.getReference("user"); String key = myRef.push().getKey();

Android: Retrieve data of a specific user from a Firebase database

社会主义新天地 提交于 2020-01-28 08:05:31
问题 I am trying to read "specific" data from my firebase realtime database. I have seen examples of getting all data from a table and going through it to find the data record you want, but that is definitly not a recommended safe practice. Below is how I save my data private void saveInDatabase(String email) { // Write a message to the database FirebaseDatabase database = FirebaseDatabase.getInstance(); DatabaseReference myRef = database.getReference("user"); String key = myRef.push().getKey();

Android: Retrieve data of a specific user from a Firebase database

时光怂恿深爱的人放手 提交于 2020-01-28 08:05:28
问题 I am trying to read "specific" data from my firebase realtime database. I have seen examples of getting all data from a table and going through it to find the data record you want, but that is definitly not a recommended safe practice. Below is how I save my data private void saveInDatabase(String email) { // Write a message to the database FirebaseDatabase database = FirebaseDatabase.getInstance(); DatabaseReference myRef = database.getReference("user"); String key = myRef.push().getKey();

Sorting in descending order in Firebase database [duplicate]

女生的网名这么多〃 提交于 2020-01-27 23:15:37
问题 This question already has answers here : Firebase Data Desc Sorting in Android (12 answers) Closed 2 years ago . There is this list of Books in the Firebase Realtime Database: [ { title: "Don't Make Me Think", upvotes: 110 }, { title: "The Mythical Man Month", upvotes: 111 }, { title: "Code Complete 2", upvotes: 112 } ] By default, the query below returns this list in ASC order: firebase.database().ref('books').orderByChild('upvotes') How can I query and order them by upvotes DESC instead?

Sorting in descending order in Firebase database [duplicate]

六眼飞鱼酱① 提交于 2020-01-27 23:11:46
问题 This question already has answers here : Firebase Data Desc Sorting in Android (12 answers) Closed 2 years ago . There is this list of Books in the Firebase Realtime Database: [ { title: "Don't Make Me Think", upvotes: 110 }, { title: "The Mythical Man Month", upvotes: 111 }, { title: "Code Complete 2", upvotes: 112 } ] By default, the query below returns this list in ASC order: firebase.database().ref('books').orderByChild('upvotes') How can I query and order them by upvotes DESC instead?

Sorting in descending order in Firebase database [duplicate]

不想你离开。 提交于 2020-01-27 23:11:46
问题 This question already has answers here : Firebase Data Desc Sorting in Android (12 answers) Closed 2 years ago . There is this list of Books in the Firebase Realtime Database: [ { title: "Don't Make Me Think", upvotes: 110 }, { title: "The Mythical Man Month", upvotes: 111 }, { title: "Code Complete 2", upvotes: 112 } ] By default, the query below returns this list in ASC order: firebase.database().ref('books').orderByChild('upvotes') How can I query and order them by upvotes DESC instead?

How to update a specific node based on another node in firebase realtime database android [closed]

一个人想着一个人 提交于 2020-01-26 04:03:46
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 18 days ago . I have two parent node with some child. when i try to update one child from one node then another child node also should update. for example when i update time_slot (child node) 09:00AM to 10:00AM from one node then it should reflect in another node also. Like in sql database

How to update a specific node based on another node in firebase realtime database android [closed]

守給你的承諾、 提交于 2020-01-26 04:03:19
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 18 days ago . I have two parent node with some child. when i try to update one child from one node then another child node also should update. for example when i update time_slot (child node) 09:00AM to 10:00AM from one node then it should reflect in another node also. Like in sql database

Save date in Firebase Realtime Database

自作多情 提交于 2020-01-26 03:59:25
问题 Now my working code is where I save the date as String is here Now i want save date as a ServerValue.TIMESTAMP as in this answer So first i tried to modified my model: data class Target( val guid: String = "", val name: String = "", val description: String = "", val timestamp: MutableMap<String, Any>? = mutableMapOf() ) after in presenter write smth like this: fun addTarget(name: String, description: String, timestamp: ServerValue) { if (!TextUtils.isEmpty(name)) { val id: String =