firebase-realtime-database

Start next activity if firebase database has no child value

不想你离开。 提交于 2019-12-24 21:04:55
问题 I am using to populate the Recycleview Adapter form firebase database in Activity A. I am looking for solution to return to Mainactivity when it has empty parent or no child. Here is my code public class SubjectBooks extends AppCompatActivity { FirebaseAuth fauth; String user; DatabaseReference dbreference,dbref; RecyclerView rv; String subject; int child_count=0; ArrayList<Books> list; SubjectBooksAdapter staggeredBooksAdapter; ProgressDialog progressDialog; @Override protected void onCreate

Display Firebase Data on HTML Page

﹥>﹥吖頭↗ 提交于 2019-12-24 20:40:33
问题 I'm trying to display messages on a feed using the following template called feed.component.html <div class="feed"> <div *ngFor="let message of feed | async" class="message"> <app-messages [chatMessage]="message"></app-messages> </div> </div> I keep getting the following error, and am unable to display the messages I send to the Firebase Database on my html chat page. ERROR Error: InvalidPipeArgument: '[object Object]' for pipe 'AsyncPipe' I've also got my feed.component.ts file as follows:

How to check unique username in Firebase Database (swift)

坚强是说给别人听的谎言 提交于 2019-12-24 20:30:27
问题 I've Firebase Database where each user has own email and username. How to check unique username? I tried to make it like this, but my code doesn't work properly therefore different users can have the same username usernameField.isHidden = false let username:String = self.usernameField.text! if (usernameField.text?.isEmpty == false){ ref.child("users").queryOrdered(byChild("username").queryEqual(toValue: username).observeSingleEvent(of: .value, with: { snapshot in if snapshot.exists(){ print(

React Native/Firebase Error app hasn't been created

余生颓废 提交于 2019-12-24 20:18:16
问题 Problem I am creating a simple app where people can create posts using react native and firebase , and when I added all of the code to upload a variable "postInput" to a server, I got an error (picture included) saying that the app hasn't been created, and it tells me to call App.initializeApp() but I do have that code in my app. I would love some help solving this problem. Code import React, { Component } from 'react'; import { StyleSheet, Text, View, Image, TextInput, ScrollView,

Can't Get Firebase Google App Script Quickstart Tutorial to Work

风流意气都作罢 提交于 2019-12-24 20:17:54
问题 I can't seem to get the Firebase QuickStart to work for me. I'm pretty sure that I followed all of the instructions correctly. But I'm not getting access to write to the database. And according to the instructions the database is currently open to the public with the suggest rules change displayed below. Has anybody ever gone through this tutorial before? I'd like a hint as to what to do next. Here's the code. function writeDataToFirebase() { var ss = SpreadsheetApp.openById("1rV2

Firebase delete account along with Database and Storage on iOS

百般思念 提交于 2019-12-24 20:17:49
问题 I am trying to implement a function to delete current user's account on iOS. Account deletion works properly but the problem is that I cannot delete the account's data from Database and Storage when deleting an account. "currentUser.delete" deletes the account but I think there is no authentication to delete its data from Database and Storage. Permission denied message shows up in the log. After running this function, I get to see the account is gone in Firebase Console Authentication page

How to increase a value in Firebase Realtime Database?

ε祈祈猫儿з 提交于 2019-12-24 20:13:03
问题 I have this simple struct: { "items": { "item1": { "likes": 4 }, "item2": { "likes": 5 } } } I enable offline mode: Firebase.getDefaultConfig().setPersistenceEnabled(true); Multiple users can increase the "likes" fields at the same time. How can I increase the likes filed by 1 in offline mode? If I get the likes value than set it with the increased value, what happens it the device reaches the server but another users before that have increased the same likes field? Will it overwite the value

how to retrieve Firebase json ArrayList inside Arraylist data and store it in Arraylist for display in Textview later

被刻印的时光 ゝ 提交于 2019-12-24 20:11:50
问题 I want to retrieve data from fire-base to display later in Text View. but Data-snapshot is not getting all the key and value(i.e. date,month,year) only reaching to date . i need to date month and year in single Text View.. for timing i insert data as String in fire-base.. i did tried to add date value to Array-list but it showing null. when i check in debugger. i know less about debug. Problem is in Second FOR loop i need to display account and amount also. In list view date(complete date)

Create hidden user node using firebase realtime

大城市里の小女人 提交于 2019-12-24 19:58:34
问题 I am having some issues with Firebase security rules. I want any user to be able to create an account using my iOS app at the same time once he or she establishes the account I want to have two nodes one is private, and one is public. I want the public to be accessed by anyone, including the user its self, but the user that created the account only accesses the private node. I have tried a lot of things, but none of my work seems to work. I want to fetch all the public node values by just

(lldb) error with Firebase

戏子无情 提交于 2019-12-24 19:56:46
问题 I'm getting an lldb error whenever I click on a specific tab. The tab is called Account and its supposed to pull data from a child node called "requests" and display that data in a list(table view controller). I've done this multiple times before. I'm even using my own recycled code for this task, but the error keeps showing up. I've already made sure each button/label is connected to the view controller and I've made sure none are disconnected. The error message is saying that my request