firebase-realtime-database

Android studio remove items from both listview and firebase

…衆ロ難τιáo~ 提交于 2020-01-05 08:13:19
问题 I'm trying to remove items from both listview and firebase in android studio. When I remove items from the firebase console, it automatically removes items from listview. However I want to remove items from the listview first, and want this changes to be reflected on the database. public class PreferActivity extends AppCompatActivity { //Firebase Var private DatabaseReference mDatabase; //Android Layout private Button btnAdd; private EditText etText; private ListView listView; //Array list

Firebase DatabaseReference vs DataSnapshot

梦想的初衷 提交于 2020-01-05 07:57:27
问题 I did not quite understand when should I use DatabaseReference and when DataSnapshot. In my application I seem to be using both of them without real distinction (maybe except for writing to Firebase in which case DataSnapshot was not made for). 回答1: A DatabaseReference is a starting point for all database operations. This allows you to read, write, and create new DatabaseReferences. A DataSnapshot is an efficiently-generated immutable copy of the data at a Firebase Location. They cannot be

Firebase DatabaseReference vs DataSnapshot

痴心易碎 提交于 2020-01-05 07:57:09
问题 I did not quite understand when should I use DatabaseReference and when DataSnapshot. In my application I seem to be using both of them without real distinction (maybe except for writing to Firebase in which case DataSnapshot was not made for). 回答1: A DatabaseReference is a starting point for all database operations. This allows you to read, write, and create new DatabaseReferences. A DataSnapshot is an efficiently-generated immutable copy of the data at a Firebase Location. They cannot be

How to save data on Firebase?

◇◆丶佛笑我妖孽 提交于 2020-01-05 07:53:47
问题 I take a tutorial to save date on Firebase in React Native. When i compile it that show the error is _firebase2.default.database.ref is not a function But the question that offcial tutorial is .ref too. https://firebase.google.com/docs/database/web/read-and-write Any one can teach me how to solve the issue , thanks in advance. My rules setting on Firebase: { "rules": { "users": { "$uid": { ".read": "$uid === auth.uid", ".write": "$uid === auth.uid" } } } } Save data code in React Native:

getDownloadUrl() of firebase storage return the same and wrong link for all the uploaded files. How to fix this? [duplicate]

折月煮酒 提交于 2020-01-05 07:18:49
问题 This question already has answers here : How to get URL from Firebase Storage getDownloadURL (10 answers) Closed last year . I am building chat functionality withing an app using firebase. Everything works except for fetching images from storage. The image gets uploaded successfully but the downloadURl stored in the database for all images is always com.google.android.gms.tasks.zzu@7e17eff . The image is fetched if I manually change the download link in the database after copying it from

Firebase Cloud Functions: How to push data using wildcards in http requests

纵然是瞬间 提交于 2020-01-05 06:52:12
问题 I'm exploring new Cloud Functions feature in Firebase, so I know how wildcards work in Realtime database triggers, but when I'm trying to add wildcards in http request, it ignores wildcards and pushes new data into the new {userId} object. Basically, I'm trying to make a function, which will take data from all the users in 'today' object and push it into 'yesterday' object (something like statistics or process). For that I'm using this topic based on cron example. I have started with building

Firebase Cloud Functions: How to push data using wildcards in http requests

萝らか妹 提交于 2020-01-05 06:52:09
问题 I'm exploring new Cloud Functions feature in Firebase, so I know how wildcards work in Realtime database triggers, but when I'm trying to add wildcards in http request, it ignores wildcards and pushes new data into the new {userId} object. Basically, I'm trying to make a function, which will take data from all the users in 'today' object and push it into 'yesterday' object (something like statistics or process). For that I'm using this topic based on cron example. I have started with building

AngularFire V1.2 $firebaseArray() $loaded() only called once [duplicate]

与世无争的帅哥 提交于 2020-01-05 06:49:30
问题 This question already has an answer here : $on loaded fires once for new references AngularFire 0.5.0 (1 answer) Closed last year . I am using AngularFire and promises on arrays ( $loaded() on firebaseArray() ). Currently, I'm using the following code: Problem : I go to page1, the data is loaded and all fine. Go to page 2 and come back to page1. Now the $loaded() doesn't work until I do a full page refresh. How do I fix this problem? app.factory('Items', ['FBURL', '$firebaseArray', function

Is it possible to store simple data (such as string/int/double) into Firebase storage?

会有一股神秘感。 提交于 2020-01-05 06:04:31
问题 I have this class called CardModel that acts like a container and stores the cardName (as string), a caption (string), gps coordinates (double), and a few other things. I want to be able to store a cardModel object into Firebase. But it seems Firebase storage only deals with Files/URI/ and anything to do with photos or videos. Must I use the Firebase real time database to store my customized objects? And can Firebase database be the only one to store simple data types such as strings, doubles

Firebase authentication for checking if the user exists in the database or not

元气小坏坏 提交于 2020-01-05 05:52:08
问题 This is my Firebase database structure STUDENT ur14cs002 id:ur14cs002 pass:abc ur14cs001 id:ur13cs001 pass:def I have to check with my user's id like when user enter in edit text that needs to be check if that particular user exists in the database or not. Below code this is what i did bt this code is not working at all. EditText id = (EditText) findViewById(R.id.userEmail); EditText password = (EditText) findViewById(R.id.userPassword); database = FirebaseDatabase.getInstance(); String child