firebase-realtime-database

How can i get only keys from firebase?

蹲街弑〆低调 提交于 2020-01-06 05:51:11
问题 I have a structure of database as on image and I need to display this date which is in the red rectangle. I tried to do smth like this, but it throws an error and I couldn't find same questions on a stack. my database reference.child("doc1").observe(.value, with: { (snapshot) in if snapshot.exists() { for date in (snapshot.value?.allKeys) } 回答1: Your structure is a Dictionary of Dictionary so you have to cast your snap to [String:[String:Any]] where the key is your "11dot..." and value

Firebase cloud function won't return anything from forEach?

馋奶兔 提交于 2020-01-06 05:26:16
问题 When my trigger receives an update, I am trying to loop through another node via the admin sdk to iterate through the results from the snapshot with matching keys from the wildcard {itemId}. For some reason my forEach seems to not do anything and I don't know why. I have been trying to resolve this for quite some time now. I have never had a problem querying my firebase DB but now that I am trying to do so in cloud functions I have not been having any luck at all. I don't know if this is

one firebase database to two diff apps [duplicate]

≯℡__Kan透↙ 提交于 2020-01-06 05:24:06
问题 This question already has an answer here : Firebase database deleted when added app (1 answer) Closed last year . I have two Android project1:1.qaai_admin 2.qaai, I want to send data from app no 1 to firebase and retrieve that data by app no 2,in this I need both the app sharing same firebase database, how can I do that? 回答1: STEPS TO DO THIS: Go to your Firebase Console Select Home Tab Click on Add App Select Add Firebase to your Android App Provide the details for the Package Name Download

How to retrieve firebase database for specific user only?

拟墨画扇 提交于 2020-01-06 05:22:17
问题 I am using Firebase Database for my android application. Login feature is available. There is a bookmark/favourite option in the app. After pressing the bookmark button the data are saving with the user id separately. Exactly what I want. But the problem is when I am trying to retrieve the saved data in recycleview they are showing all user's data instead of the user logged in. Please help me. I am using cardview in recycleview. mUserDatabase = FirebaseDatabase.getInstance().getReference(

Retrive Image from Firebase to show in my Imageview

社会主义新天地 提交于 2020-01-06 05:17:50
问题 I'm looking forward to Display the images stored in Firebase Storage with refrence from Firebase Database. Below is my Firebase Data Structure and my Storage Structure is Below is my code of Recycle adapter, I'm using to retrive images from Firebase public class SubjectBooksAdapter extends RecyclerView.Adapter<SubjectBooksAdapter.MyViewHolder> { ArrayList<Books> bookslist; CardView cv; FirebaseAuth fauth; FirebaseDatabase database; DatabaseReference dbreference; Books b; public

android firebase database how to retrieve all data from child node

放肆的年华 提交于 2020-01-06 05:16:12
问题 I've got an app where it retrieves a bunch of data from firebase but I cant seem to make it work. database = FirebaseDatabase.getInstance(); myRef = database.getReference().child("Sold").child("Item"); myListView = (ListView)findViewById(R.id.listView); final ArrayAdapter<String> myArrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, myArrayList); myListView.setAdapter(myArrayAdapter); myRef.addChildEventListener(new ChildEventListener() { @Override public void

How to add links in my list and retrieve the data?

冷暖自知 提交于 2020-01-06 04:50:27
问题 After creating new classroom, the data will then be send to a list as shown on here: Now, how do I add/make (a) link/s into every classroom so that whenever I click it it will redirect me to a page and show me their specific data like ClassroomID, students, etc. here's the code: //retrieving var userRef = firebase.database().ref().child('Classes' + '/' + user.uid); userRef.on('child_added', function (data) { var roomNames = data.val().TheClass; var ul = document.createElement('ul'); document

Referencing authentication db data in real time db firebase

我只是一个虾纸丫 提交于 2020-01-06 04:50:06
问题 I am making a website with login and registration facility using firebase. I have used firebase "Authentication" database to store the registered users.However, "Authentication" database doesnt store anything other then emailid, password and an auto generated UUID. I need to store more data like username, profile pic etc for a user. I would be using firebase's "real time" database for the same. My question is what is the best practise to do the same. Should I use the UID as primary key from

How to compare two different Firebase database child items f

怎甘沉沦 提交于 2020-01-06 01:56:23
问题 I need help in order to implement a functionality in my app such that if the user chooses a restaurant, a list of items that are available in the restaurant are displayed and if there are none, it displays a text and a button. I went about it like this:I would compare two child items, the restaurant names to check if they are equal.If they are, it displays a recyclerview with a list of the items available. Here is a screenshot of my firebase database structure My goal is to 1. compare if the

How to register a User in Firebase using Node.js?

ぃ、小莉子 提交于 2020-01-05 08:37:31
问题 PROBLEM: 0) The user is created in the auth system in Firebase (I see it in the Auth tab), 1) But no changes are made to the database. 2) The page seems to be stuck infinitely loading. 3) Only "Started 1..." is logged to the console. CODE: router.post('/register', function(req, res, next) { var username = req.body.username; var email = req.body.email; var password = req.body.password; var password2 = req.body.password2; // Validation req.checkBody('username', 'Username is required').notEmpty(