firebase-realtime-database

Delete data from firebase recycler view adapter without deleting in the database

折月煮酒 提交于 2019-12-25 05:23:22
问题 That is it, can i remove a view from firebase recycler view adapter, but not deleting in the database?How? final FirebaseRecyclerAdapter<Game,GameViewHolder> firebaseRecyclerAdapter=new FirebaseRecyclerAdapter<Game, GameViewHolder>( Game.class, R.layout.row, GameViewHolder.class, mdatabase ) { @Override protected void populateViewHolder(GameViewHolder viewHolder, Game model, final int position) { viewHolder.setTitle(model.getGame_name()); viewHolder.setJugado(model.getJugado()); viewHolder

Firebase realtime data in not getting added properly in scope variable angularjs

…衆ロ難τιáo~ 提交于 2019-12-25 05:08:12
问题 This is firebase structure for categories2. and this is for subcategories2. To display data on screen I want $scope.Categories [] to be filled in this format. [{ "id": "1", "display_with": "7", "image": "/images/salt_sugar.png", "name": "Salt & Sugar", "subcategories": [{ "scid": "1", "scname": "Sugar Products" }, { "scid": "5", "scname": "Tea" } ] }, . . . . ] Logic for filling $scope.Categories []. $scope.Categories = []; var categoriesRef = firebase.database().ref('categories2');

How to Angularfire2 remove() by some key value

橙三吉。 提交于 2019-12-25 04:57:20
问题 I am trying to delete comments of a particular thread orderby some key(sid) value. eComments 0b4080bb4e686f003aaa340f8ed2e2a6 cid: "0b4080bb4e686f003aaa340f8ed2e2a6" comment: "Prison Break revolves around two brothers: one ..." createdAt: 1487250871623 rating: 0 sid: "c088239a29827946f932f73c9a1d495a" uid: "SFmtrI0ta5PsqYkgqZuJo2" updatedAt: 1487250871623 4bde9de83ac2bb6d06df9876c2294483addclose cid: "4bde9de83ac2bb6d06df9876c2294483" comment: "arrives at the jail, he meets the prison denize.

Firebase: HowTo update the value item of a record without knowing its unique id?

心已入冬 提交于 2019-12-25 04:29:23
问题 So, I have a firebase structure as follows: "Posts" : { "0" : { "code": 12345TG4 "Likes" : 59 }, "1" : { "code": RT560451 "Likes" : 12 } } Ideally what I want to do is: var updateData = { Likes: 74 } Posts.child(id).update(updateData); But I don't know the UiD in advance, but I do have the value of the 'code', which is itself a unique value. How do I create a query which can update the value 'Likes' based on the known value of 'code' in Firebase? 回答1: As Doug commented and Rodrigo showed, you

How to update friends image like whatsApp with Firebase

筅森魡賤 提交于 2019-12-25 04:21:51
问题 Im working on a chat app using Firebase for storage and the realTime DB. I have an userFriends tree in my DB where each user get his list of friends: I have in storage each users profil photo , whats the best way/logic to download photos of the user's friends (to a local File with NSUrl/ in memory with NSData/ generate an URL) ,and more important to be updated if a friend modify his photo? thanks for your help! 回答1: For storing the image Parameters infoOnThePicture:- info of the picture that

Handle asynchronous authentication in Firebase on page reload to get list that needs user's uid

谁说胖子不能爱 提交于 2019-12-25 04:21:23
问题 Using Angularjs. How do you handle the situation where a person reloads a page and the controller tries to query Firebase using the current user's uid before the Firebase auth event is triggered and has a chance to set the current user? Details: The Firebase query require's the user's uid and everything works when navigated to the route via $state.go('/list') But when a person reloads the page the controller checks for the user which doesn't exist until this event handler fires: auth

Handle asynchronous authentication in Firebase on page reload to get list that needs user's uid

女生的网名这么多〃 提交于 2019-12-25 04:20:36
问题 Using Angularjs. How do you handle the situation where a person reloads a page and the controller tries to query Firebase using the current user's uid before the Firebase auth event is triggered and has a chance to set the current user? Details: The Firebase query require's the user's uid and everything works when navigated to the route via $state.go('/list') But when a person reloads the page the controller checks for the user which doesn't exist until this event handler fires: auth

Firebase onChildAdded not called when there is no data

别等时光非礼了梦想. 提交于 2019-12-25 04:13:55
问题 I want to check if there is child inside or not.When I have data then it goes inside OnChildAdded else when there is no child that is not being called? I want to know if there is any data or not? How do I check this? ref.orderByKey().startAt(todayDate).endAt(tomorrowDate).addChildEventListener(new ChildEventListener() { @Override public void onChildAdded(DataSnapshot dataSnapshot, String s) { System.out.println("does the child exist? " + dataSnapshot.child("matches").exists()); for

ionic 2 ion-select not sending value to formbuilder

本小妞迷上赌 提交于 2019-12-25 04:11:21
问题 I'm using formbuilder in ionic 2 but facing problems with the ion-select directive when using formControlName with it. All the data is being forwarded to firebase where these values are being set. here's an extract from the html <ion-item fromGroupName="carDetails"> <ion-label floating>car make</ion-label> <ion-select #carMake (change)="elementChanged(carMake)" formControlName="carMake"> <ion-option value="ford" selected>Ford</ion-option> <ion-option value="bmw">BMW</ion-option> <ion-option

How to rename parent node?

我的未来我决定 提交于 2019-12-25 04:03:42
问题 I'm very new in Angularfire. I created a Firebase parent node, with several other parents. Now I need to know how to rename the main parent node. 回答1: You cannot rename it easily within the console, but you can add a new node with the same content "Meeting with..." and delete the existing node. 回答2: Thanks Björn, Finally I found it. $scope.addMeeting = function(){ if($scope.meetingEditCheck){ var key = $scope.editKey; var newPostKey = firebase.database().ref().child('users/' + firebaseUser