firebase-realtime-database

Join different nodes to observe them at once with firebase

允我心安 提交于 2019-12-23 02:34:46
问题 I'm trying to do a sample application with firebase and I don't have quite understand how I should retrieve nested-flattered data. Let's suppose I have a db like this { "users": { "user-1": { "email": "email1", "matches": [ "match-1", "match-2" ] }, "user-2": { "email": "email2", "matches": [ "match-1", "match-2" ] }, "user-3": { "email": "email3", "matches": [ "match-2" ] } }, "matches": { "match-1": { "name": "Match 1", "users": [ "user-1", "user-2" ] }, "match-2": { "name": "Match 2",

Send User Password via Email with Firebase

主宰稳场 提交于 2019-12-23 02:32:48
问题 I am creating a android application where I'm using firebase auth but I don't want to send the confirmation email to user for confirming the user email address, instead I want to set a auto generated password for the user and send it to the users email so by that way I can verify his email. Just wanted to know if it is possible or not, if yes then link to any guide or tutorial will be great. Thanks 回答1: Yes, it is possible. When user creates his account send a auto generated password on his

Firebase App is crashing

感情迁移 提交于 2019-12-23 02:32:18
问题 I'm following this tutorial:- https://www.youtube.com/watch?v=x0ScnHJi8WY and I don't know, why my app is crashing activity_main.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.vks_apps.blogs.MainActivity"> </RelativeLayout>

Firebase android how to get data from List of keys at once

爱⌒轻易说出口 提交于 2019-12-23 02:28:31
问题 I am using firebase geofire library to fetch key's based on location but because of thousands of keys are returned in onKeyEntered() event every time I have to take the key refer firebase and get the object back and set it to listview becoming very slow. I tried commenting all other work in onKeyEntered() to see how fast geofire is then I was surprised withing 900 milli's all callbacks received. So now what is the best optimized way to get the data from firebase using the key passed in

Fetch data from nested nodes in Firebase

依然范特西╮ 提交于 2019-12-23 02:28:24
问题 I am building my first project in android using Firebase . I have build a Firebase's database which is having main node as post , media as its child node, media node can contain multiple values for a particular post or can have one value inside it. So i want to fetch media child node values with particular post node. Could you please help me out. Any help will deeply appreciated. Please check the screenshots below. 回答1: Firebase ref = new Firebase(YOUR_FIREBASE_URL); String postNode ="KddShng

firebase is retrieving deleted data from database

江枫思渺然 提交于 2019-12-23 02:26:14
问题 I'm using firebase realtime database and it's working fine for some parts of my app. I was going through a tutorial on youtube which populates a collectionView with users. It uses NSDictionary to get the photo URL and username and puts them in the collection view for all users. I deleted some of the users directly in the firebase console, and now have only one user. For some reason it's still pulling the users that I deleted. This is the collectionView file. import UIKit import

Multi-users chat room data structure in Firebase Database

时光毁灭记忆、已成空白 提交于 2019-12-23 02:22:14
问题 I'm having hard time figuring out how to structure multi users chat room FirebaseDatabase architecture properly. Basically, the app supports private messages between users (could be between 2 users or multiple users). If it was between 2 users only, the data structure is quite easy really. I'm trying to reduce the cost (I don't want when the current logged user is having a chat with someone and the observer is getting all the messages that are no related to this particular chat) and structure

Filtering and Permissions in Firebase

偶尔善良 提交于 2019-12-23 02:07:17
问题 I asked this question about my Firebase implementation. Essentially, I was trying to structure my Firebase database so that I could have a collection of objects, with some users accessing a subset of these objects. In my example, I have tasks. Multiple users will use this database, and per Firebase's suggestion, all the tasks for all users are flattened as children of one parent node. Each user can access their own tasks, indicated by a creatorId in a task object. Perhaps in the future

Firebase DataSnapshot Null values

霸气de小男生 提交于 2019-12-23 02:04:36
问题 My app allows you to add a Player to a node, once they have been added I am using the below method to search by phoneNum to see if that player exists in the 'users' node. Where I am having trouble is that I need to be able to access the values from the datasnapshot for the user within the found matching node. e.g.return the value of the user id. When I attempt this it keeps showing as a null value and when I try to log to the console it complains that it is a null value which doesn't make

How to implement Firebase with ViewPager?

无人久伴 提交于 2019-12-23 01:54:23
问题 What is the best way to use firebase with ViewPager. Expected Output How can I use ViewPager with Firebase such that it notifies the firebase for the position and gets and attaches the data accordingly? Person.java public class Person { private String name; private String email; private String hobby; public Person(){ } public Person(String name , String email , String hobby){ this.name= name; this.email = email; this.hobby = hobby; } public void setName(String name) { this.name = name; }