firebase-realtime-database

Three way binding in Angular 2 and Angularfire2

一世执手 提交于 2019-12-31 11:07:07
问题 I am trying to three-way bind an input element to firebase database in Angular.js 2 (2.0.0-rc.4), using AngularFire 2 (2.0.0-beta.2). I have a very simple html like: <form (ngSubmit)="onSubmit()" #commentForm="ngForm"> <input [(ngModel)]="model.author" type="input" name="author" required> </form> In my component, to save and retrieve contents of this input to firebase, I have an implementation like this: export class CommentFormComponent implements OnInit, AfterViewInit { @ViewChild(

Populate a collection view with firebase data

纵然是瞬间 提交于 2019-12-31 10:35:32
问题 I'm trying to recreate a new firebase project where you populate a table view with data from firebase realtime database that contain links to images in firebase storage. I can populate the tutorial project which is a table view with firebase data. But with my current project it is a collection view inside an extension. I've narrowed down the issue to my variables var ref: FIRDatabaseReference! var messages: [FIRDataSnapshot]! = [] var msglength: NSNumber = 10 private var _refHandle:

Firebase Cloud function update all entries in database

百般思念 提交于 2019-12-31 07:53:45
问题 i have bunch of comments in Firebase database and i want to do some updates to the comments via Cloud Function ( this is simplified example, i will be doing some logic which does require Cloud Function ). What i need to do is go through all the comments in the database, adjust its rating node and then update the database with adjusted comments. I spent a lot of time researching this, but i am completely new to Cloud Functions, so i have realy hard time figuring this out. I am assuming i want

Firebase queryEqual doesn't work

雨燕双飞 提交于 2019-12-31 07:23:10
问题 I have the following hierarchy in my Firebase: func invitedEvents() { DataService.ds.REF_EVENTS.queryOrdered(byChild: "eventParticipant").observe(.childAdded, with: { (snap) in print("KEEEY:\(snap.key)") let value = snap.value as? NSDictionary if snap.exists() , value?["eventParticipant"] != nil{ print("eventParticipant:\(value?["eventParticipant"])") var valueArray = value?["eventParticipant"] as! [[String:AnyObject]] for (index, element) in valueArray.enumerated() { print("valueArray\(index

Android - Two types of users in Firebase

大城市里の小女人 提交于 2019-12-31 07:06:21
问题 I am developing a simple android application with Firebase. I want to save the users in the real time database without using authentication with email and password. I simply want their name and their role (eg. teacher and student) picked by radiobuttons. Later I want to display all users in a list, but I was wondering how the database should be set up and how to display the right activity based on their role Should it be: User "something" username: "name" role: "Teacher" or User

Configure Proguard-rules with Firebase

雨燕双飞 提交于 2019-12-31 06:53:27
问题 I've this project and i use Firebase Realtime Database. It's correct write this proguard rules? -keepattributes Signature -keepclassmembers class activity.** { *; } -keepclassmembers class adapter.** { *; } -keepclassmembers class fragment.** { *; } -keepclassmembers class persistence.** { *; } -keepclassmembers class services.** { *; } The app work perfectly but when i release on PlayStore it seem that the query doesn't work. In my gradle i added release { minifyEnabled true proguardFiles

Configure Proguard-rules with Firebase

青春壹個敷衍的年華 提交于 2019-12-31 06:53:08
问题 I've this project and i use Firebase Realtime Database. It's correct write this proguard rules? -keepattributes Signature -keepclassmembers class activity.** { *; } -keepclassmembers class adapter.** { *; } -keepclassmembers class fragment.** { *; } -keepclassmembers class persistence.** { *; } -keepclassmembers class services.** { *; } The app work perfectly but when i release on PlayStore it seem that the query doesn't work. In my gradle i added release { minifyEnabled true proguardFiles

How to add no-argument constructor of inbuilt class for Firebase-database exception? [duplicate]

ε祈祈猫儿з 提交于 2019-12-31 06:35:41
问题 This question already has an answer here : Class android.location.Location does not define a no-argument constructor (1 answer) Closed last year . I am trying to fetch the FirebaseLocationData object from Firebase Realtime Database in Android. According to Docs, the class should have no arguments constructor which i have done as public FirebaseLocationData() {} but it is still showing error com.google.firebase.database.DatabaseException: Class android.location.Location does not define a no

Filter Data from RecyclerView Firebase

北城以北 提交于 2019-12-31 06:08:24
问题 I am trying to implement a searchview in my action bar and for that to filter the RecyclerView Data that I retrieved from Firebase. Right now I am looking for the code that I need to add to the recycleradapter to be able to filter the retrieved data. This is how I added the recyclerView to my MainActivity. Query query = mRef.orderByChild("city"); // everything else FirebaseRecyclerAdapter<City, CityViewHolder> firebaseRecyclerAdapter = new FirebaseRecyclerAdapter<City, CityViewHolder>( City

How can I count the number of user from collection join to another collection firebase real time not firstore and angular 8 [closed]

扶醉桌前 提交于 2019-12-31 06:01:04
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 8 days ago . In is my case each user can post one or more posts for this In table posts I addedd the table user with name UserId ,,,,, Now I'm looking for query to count the number of posts for each user please help me 来源: https://stackoverflow.com/questions/59440268/how-can-i-count-the-number-of-user-from