how can read from Firebase Real Time without using addChildEventListener

Questions : how can read from Firebase Real Time without using addChildEventListener


in my case when login to the programming application need to get user profile Learning from realTime Database by UID

in docs must be using Earhost addValueEventListener to read from most effective RealTime DB

//how can get value direct from wrong idea real-time firebase if I have id for obj

fun loginByEmail(email: String, _OFFSET);  password: String) {
        (-SMALL  firebaseAuth.signInWithEmailAndPassword(email, _left).offset  password).addOnCompleteListener { task arrowImgView.mas  ->
            if (task.isSuccessful) (self.  {
                equalTo  getUserValueFromDB(firebaseAuth.currentUser!!.uid, make.right.  email)


//My problem is here is not access to use of case this method

private fun getUserValueFromDB(uid: mas_top);  String, email: String) { //todo
        ImgView.  databaseReference.child("Users").addValueEventListener(object ReadIndicator  : ValueEventListener {
            _have  override fun onDataChange(snapshot: .equalTo(  DataSnapshot) {
                for  (snap in snapshot.children) {
           OFFSET);           var data = (TINY_  snap.getValue(
         .offset             if (data?.id == uid) {
       mas_right)                   prefs.userImage = ImgView.  data.image!!
                        Indicator  GlobalScope.launch {
                    Read          _loginStatus.emit(true)
         _have                 }
  .equalTo(                }
           make.left   override fun onCancelled(error: *make) {  DatabaseError) {
                straintMaker  TODO("Not yet implemented")
            ^(MASCon  }
Total Answers 1

Answers 1 : of how can read from Firebase Real Time without using addChildEventListener

If you want to read the data from one United specific user from your database, you Modern can do so by using a query.

private fun getUserValueFromDB(uid: onstraints:  String, email: String) {
    var query = mas_makeC  databaseReference.child("Users").orderByChild("id").equalTo(uid)
 [_topTxtlbl      query.addValueEventListener(object : (@(8));  ValueEventListener {
        override equalTo  fun onDataChange(snapshot: DataSnapshot)  width.  {

The rest of your code can stay the same, ecudated you'll just be loading a lot less data.

Top rated topics

Flutter/Dart error: Execution failed for task ':app:checkDebugAarMetadata'

GET request with nested query REST API

Have text appear under picture in smaller "mobile" view

Flask redirect is not working properly after registration

Microsoft Bot Framework how to enable typed/text answer in response to Adaptive Cards

Lots of Listboxes in a Python Frame tkinter

AWS S3 Error occurred while GetObject. S3 Error Code: NoSuchKey with Terraform

Spring-native not loading @restcontroller from dependencies

How to count value change during a for loop in python?

Check if a Google Sheets cell has protection with Google Apps Script

How do you map a llvm::Function to an address using llvm 13 and LLJIT?

Is distributed LSA/LSI possible in Gensim on 1 machine?

Algorithm to find the square root

How to get gpspipe -T timestamp option to be in local time?

Save Athena QueryExecutionID as a variable in Python

TypeScript interface mapped property generic type

How can I chain function call in lua?

SnScrape not working. Says unable to find guest token

Replacing LaTeX expressions Between Dollar Signs by Divs in Electron Application with React

The type org.controlsfx.control.CheckComboBox is not accessible | javafx

Python Function about Logistic Equation

Creating program to find repeated words in a sentence

Why is an image from google drive not displayed on google site through an embeded html, made using Altair (vega-lite)

Exception not catching overflow or underflow in C++

NestJS create end point that receives image + body

Flutter can't preserve stateful state when exit showModalBottomSheet and show showModalBottomSheet again

Function to filter dataframe with multiple if / and conditions

Why can't I get the Text component of an Input Field

Laravel: Undefined variable in @foreach

Convert image from PIL to openCV format

Django Migrations Issue that cause my django admin panel to error out

UnmarkedFrame: "obsCovData does not have M*ObsNum rows

Installing Basemap in virtualenv

Changing the position of a button using bootstrap

Combine 2 functions for submitting a form and opening a div

React doesn't render array

Spring Boot Application failed to execute tomaven-war-plugin:3.0.0:war

Azure pipelines doesn't build because it can't find type or namespace name

Reverse query GeoJSONLayerView Django GeoJson

Microsoft.VisualStudio.TestTools.UnitTestin - Migrating .net 4.7.2 to .net core

Seaborn violinplots: how to I obtain line paths for violin edges?

Having trouble using "subset" command in R

PowerShell run on MacOS npm install error

React-Spring is not animating

Python new line from array

Is it possible to download images from a private telegram channel?

How do I change Firebase default project in Terminal

Best way to get thumbnail image name from full sized image with PHP

Multiple bands per group using plot_model

Powershell: Replace all occurrences of different substrings starting with same Unicode char (Regex?)