firebase-realtime-database

Firebase android how to prevent FirebaseRecyclerAdapter automatically updating?

谁都会走 提交于 2020-02-20 08:52:05
问题 I have a FirebaseRecyclerAdapter which I do not want to keep updating the RecyclerView . This is because I have it so it populates the view with items based on how many 'views' they have in the database. The problem is, if other people view the items, the list you see in the app will keep changing order. Is there a way to stop the recycler adapter from constantly listening for data changes or will I have to go about this another way? Any help is greatly appreciated, thanks. 回答1: The adapters

Firebase storage get Download URL after image upload successfully to firebase storage

爱⌒轻易说出口 提交于 2020-02-16 12:20:03
问题 This is the entire code to upload a image and get the download url The image are uploaded successfully but the download url is not printed <html> <head> <title> firebase save</title> <style media="screen"> body{ display : flex; min-height: 100vh; width : 100%; padding : 0; margin:0; align-items: center; justify-content: center; flex-direction: column; } #uploader{ -webkit-appearance: none; appearance: none; width: 50%; margin-bottom: 10px; } </style> </head> <body> <progress value="0" max =

Firebase storage get Download URL after image upload successfully to firebase storage

ⅰ亾dé卋堺 提交于 2020-02-16 12:19:10
问题 This is the entire code to upload a image and get the download url The image are uploaded successfully but the download url is not printed <html> <head> <title> firebase save</title> <style media="screen"> body{ display : flex; min-height: 100vh; width : 100%; padding : 0; margin:0; align-items: center; justify-content: center; flex-direction: column; } #uploader{ -webkit-appearance: none; appearance: none; width: 50%; margin-bottom: 10px; } </style> </head> <body> <progress value="0" max =

Firebase storage get Download URL after image upload successfully to firebase storage

非 Y 不嫁゛ 提交于 2020-02-16 12:18:36
问题 This is the entire code to upload a image and get the download url The image are uploaded successfully but the download url is not printed <html> <head> <title> firebase save</title> <style media="screen"> body{ display : flex; min-height: 100vh; width : 100%; padding : 0; margin:0; align-items: center; justify-content: center; flex-direction: column; } #uploader{ -webkit-appearance: none; appearance: none; width: 50%; margin-bottom: 10px; } </style> </head> <body> <progress value="0" max =

Retrieve all data under node in firebase realtime database

旧巷老猫 提交于 2020-02-16 08:40:08
问题 I have a firebase realtime database and want to use the data to make a leaderboard. Im trying to retrieve all the data in my Scores node but am not sure how to loop through to get the scores of all users. The database structure is as below: The code I have tried to use is this: package com.example.securityapp; import androidx.appcompat.app.AppCompatActivity; import android.nfc.Tag; import android.os.Bundle; import android.util.Log; import android.widget.TextView; import com.google.firebase

Firebase : How To Get key in order after Delete key

狂风中的少年 提交于 2020-02-16 07:45:08
问题 example How to keep the key sequence after Delete ? I want it to be 0..1..2..3..etc 回答1: You cannot change the name of your keys, there is no API for doing that. If you want to change the name of a key you need to copy that particular object to another location, change the name and delete the old one. But to change the name of key is not possible in Firebase. 来源: https://stackoverflow.com/questions/50538772/firebase-how-to-get-key-in-order-after-delete-key

Firebase : How To Get key in order after Delete key

末鹿安然 提交于 2020-02-16 07:44:02
问题 example How to keep the key sequence after Delete ? I want it to be 0..1..2..3..etc 回答1: You cannot change the name of your keys, there is no API for doing that. If you want to change the name of a key you need to copy that particular object to another location, change the name and delete the old one. But to change the name of key is not possible in Firebase. 来源: https://stackoverflow.com/questions/50538772/firebase-how-to-get-key-in-order-after-delete-key

Is it possible to read from multiple child nodes?

无人久伴 提交于 2020-02-16 06:25:34
问题 I want to read all three data sourcing from "Arts & Humanities" and "Beauty & Style". Is this possible? Let ref = Database.database().reference().child("posts") //CODE A: Pulls 2 snapshot, but doesn't display anything let ref = Database.database().reference().child("posts").child("Arts & Humanities") //CODE B: only pulls up the two feeds but excludes beauty and style. Vice versa //Below is the listener code I have. This works only works with CODE B above; but ideally id like to read the post

Is it possible to read from multiple child nodes?

烂漫一生 提交于 2020-02-16 06:25:26
问题 I want to read all three data sourcing from "Arts & Humanities" and "Beauty & Style". Is this possible? Let ref = Database.database().reference().child("posts") //CODE A: Pulls 2 snapshot, but doesn't display anything let ref = Database.database().reference().child("posts").child("Arts & Humanities") //CODE B: only pulls up the two feeds but excludes beauty and style. Vice versa //Below is the listener code I have. This works only works with CODE B above; but ideally id like to read the post

How to check if username exists in my firebase database already?

笑着哭i 提交于 2020-02-16 06:25:11
问题 Cannot get Firebase to identify a username that has already been entered. The code below shows that I am trying to compare the username entered with a DataSnapshot of my database. The code doesn't seem to pick up usernames that are entered. Is the code wrong? private boolean mSwitch = false; public void checkInfo(View view){ checkUsernameIsUnique(); checkInformation(); if(mSwitch) { Intent intent = new Intent(getApplicationContext(), MenuActivity.class); saveUserInformation(); startActivity