firebase-realtime-database

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 05:58:19
问题 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

How to list the registered users names in Android (Firebase)?

这一生的挚爱 提交于 2019-12-31 05:36:39
问题 I am new to android and just learned to create a users profile like facebook or instagram, currently I have registered four users with email/password and in database am storing there email, name, phone. In another activity am trying to fetch only the names of the registered users like "People you may know" in facebook, but it is displaying nothing. private void showData(DataSnapshot dataSnapshot) { for (DataSnapshot ds: dataSnapshot.getChildren()) { UserInformation userInformation = new

issue on my recyclerview

别来无恙 提交于 2019-12-31 05:20:09
问题 I'm trying to show up recyclerview and retrieve data from firebase but I got problem after adding images which I saved on firebase storage. It closed after scrolling. I have another recyclerview which is using the same database but it doesnt have issue. can you give me solution for this? AllLaundries.java package com.example.rizkafs.laundrize; import android.content.Context; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity;

iOS Firebase -How to remove children with same key from different nodes

左心房为你撑大大i 提交于 2019-12-31 05:13:26
问题 I have a ref named Following. Under that ref there are 2 different userIds who are following the same user. If the user they are both following wants to delete their account I want to delete them from the Following node. Multi location update doesn't seem correct to achieve this. How can it be done? User kk8qFOIw... is the user who is deleting their account. Once deleted their keys should be removed from the other user's nodes. 回答1: This is how you can do it : First get all the nodes where

How can i print data in reverse order using firebase in android

旧时模样 提交于 2019-12-31 05:12:45
问题 i have a noticeboard activity to show to the notice. Now i want to print last notice at first position. Means in reverse order. if (dataSnapshot.getValue() != null) { Iterable<DataSnapshot> snapshotIterator = dataSnapshot.getChildren(); Iterator<DataSnapshot> iterator = snapshotIterator.iterator(); while (iterator.hasNext()) { //notificationCount++; DataSnapshot snapshot = iterator.next(); 回答1: If you are using FirebaseUI please use the following lines of code: LinearLayoutManager

Firebase Android - Only need specific table to be in local device

不想你离开。 提交于 2019-12-31 05:07:10
问题 I am using Firebase realtime database in my Android application. I have replica of database in local device using below line of code - FirebaseDatabase.getInstance().setPersistenceEnabled(true); But it will sync all the tables between local and global database. I only want few table need to be sync not all. Is there any way to only sync few tables in local memory and rest of table Android device will read from global database? 回答1: When you are using the following line of code:

Firebase email verification at SignUp

♀尐吖头ヾ 提交于 2019-12-31 04:47:23
问题 How should I go about verifying an email address prior to the user signing up with Firebase? I know that an email address is verified with .sendEmailVerification , however this only works on the current user. Hence a user must be already created before sending a verification email. This would not be of much help since you obviously have to verify an email before adding it to your database. Therefore, what is a good workaround? 回答1: You can't verify the email prior to sign up with Firebase

Scrolling to bottom of div without using setTimeout()

旧时模样 提交于 2019-12-31 04:46:07
问题 I am making an internal live chat system using Firebase. I make this call to get a list of all chat messages: firebase.database().ref('chatrooms/'+this.roomkey+'/chats').on('value', resp => { this.chats = []; this.chats = snapshotToArray(resp); setTimeout(() => { if(this.content._scroll) { this.content.scrollToBottom(0); } }, 1000); }); In my view I have this HTML to loop through the chats: <ion-content> <ion-list> <ion-item *ngFor="let chat of chats" no-lines> <div class="chat-status" text

Firebase Realtime database getvalue() not mapping the object

拟墨画扇 提交于 2019-12-31 04:30:12
问题 This is my firebase chat structure(see image below). I want to get only amitpal_name value not the others but this method fetching me all the values I had also use this dbreference= FirebaseDatabase.getInstance().getReference( "ChatMessage" ).child( "msg"); dbreference.orderByChild("Ref").addChildEventListener( new ChildEventListener() { @Override public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {[![enter image description here][1]][1] Iterator iterator

Firebase join data in Android

霸气de小男生 提交于 2019-12-31 04:28:11
问题 I'm try to join three data using Firebase. I want to retrieve the the school name querying to classes data knowing only guard key which is g1 . I know it can be done in two separate calls, but I'm trying to do it in just one call to the server. Is it somewhat possible? Schools schools : schoolKey1 : name: School One schoolKey2 : name: School Two Classes classes : someKey1 : name: Class One school : schoolKey1 guard : g1 Guard guards : g1 : name: Pipoy Pat 回答1: It might be too late but you