firebase

Hide recyclerview when there is no item to show with condition

三世轮回 提交于 2021-02-15 07:48:30
问题 I am facing a problem to hide RecyclerView . From Last 2 night's I am looking for the solution but I have failed to find it. I am using firebase recycleradapter to show value in recyclerview . When ever someone click the viewholderitem i save his Uid under the datasnapshot key. So to show the value if datasnapshot don't have the uid key show the value in recyclerview . If the datasnapshot have the uid key don't show his data . everything works fine . But i want to hide the recyclerview and

Upload Image to Firebase Storage with the current users UID

落花浮王杯 提交于 2021-02-15 07:44:15
问题 How do you upload an image that will also have the current user's UID attached? Example below. This is the code I am using to upload the image, but so far having no success adding on the UID. private void updloadImage(Uri pickedImage){ StorageReference myStorage = FirebaseStorage.getInstance().getReference().child("users_photos"); final StorageReference imagePath = myStorage.child(pickedImage.getLastPathSegment()); userID = fAuth.getCurrentUser().getUid(); imagePath.putFile(pickedImage)

Upload Image to Firebase Storage with the current users UID

与世无争的帅哥 提交于 2021-02-15 07:44:01
问题 How do you upload an image that will also have the current user's UID attached? Example below. This is the code I am using to upload the image, but so far having no success adding on the UID. private void updloadImage(Uri pickedImage){ StorageReference myStorage = FirebaseStorage.getInstance().getReference().child("users_photos"); final StorageReference imagePath = myStorage.child(pickedImage.getLastPathSegment()); userID = fAuth.getCurrentUser().getUid(); imagePath.putFile(pickedImage)

Upload Image to Firebase Storage with the current users UID

回眸只為那壹抹淺笑 提交于 2021-02-15 07:43:36
问题 How do you upload an image that will also have the current user's UID attached? Example below. This is the code I am using to upload the image, but so far having no success adding on the UID. private void updloadImage(Uri pickedImage){ StorageReference myStorage = FirebaseStorage.getInstance().getReference().child("users_photos"); final StorageReference imagePath = myStorage.child(pickedImage.getLastPathSegment()); userID = fAuth.getCurrentUser().getUid(); imagePath.putFile(pickedImage)

How to use one field of firebase to login

≡放荡痞女 提交于 2021-02-15 07:39:16
问题 I write the following code and when I click the next Log in button I get the following error when clicking the login button. type 'Future' is not a subtype of type 'String' I want to compare the "Phone" with the user input phone number. How can I verify that which the user enters Phone is the same which in firestore or not? my code is: import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:fmiantrader/splash.dart'; import 'componenets.dart';

I want to delete the array stored in Firestore

非 Y 不嫁゛ 提交于 2021-02-15 07:34:22
问题 I received the user's email and designated it as the name of the document, and stored the user information in the document in an array. I tried running my code, but only the Toast message is executed, not deleted. I have listed the arrays as a list using RecyclerView . Deletion will be implemented through showPop() method. This is my Firestore database enter image description here I want to delete index-0 private void showPopup(View v,final int position) { PopupMenu popup = new PopupMenu

How do I keep a user logged in? Swift

情到浓时终转凉″ 提交于 2021-02-15 06:23:32
问题 I'm using firebase for login and I need to know how to stay logged in until I log out. I have heard about UserDeafults but I'm not sure on how to use it. Here is my login view controller: import FirebaseAuth import FirebaseFirestore import Firebase import FirebaseAnalytics import UIKit class LoginViewController: UIViewController { @IBOutlet weak var emailTextField: UITextField! @IBOutlet weak var passwordTextField: UITextField! @IBOutlet weak var loginButton: UIButton! @IBOutlet weak var

Firebase Cloud functions: ECONNREFUSED

微笑、不失礼 提交于 2021-02-15 05:12:20
问题 I am trying the Optimizing Networking of firebase cloud functions like here with Typescript const http = require('http'); const functions = require('firebase-functions'); const agent = new http.Agent({keepAlive: true}); export const getXXX = functions.https.onRequest((request, response) => { const req = http.request({ host: 'localhost', port: 443, path: '', method: 'GET', agent: agent, }, res => { let rawData = ''; res.setEncoding('utf8'); res.on('data', chunk => { rawData += chunk; }); res

Firebase Cloud functions: ECONNREFUSED

限于喜欢 提交于 2021-02-15 05:10:15
问题 I am trying the Optimizing Networking of firebase cloud functions like here with Typescript const http = require('http'); const functions = require('firebase-functions'); const agent = new http.Agent({keepAlive: true}); export const getXXX = functions.https.onRequest((request, response) => { const req = http.request({ host: 'localhost', port: 443, path: '', method: 'GET', agent: agent, }, res => { let rawData = ''; res.setEncoding('utf8'); res.on('data', chunk => { rawData += chunk; }); res

Firebase storage: download images to and put to img src in React map

╄→尐↘猪︶ㄣ 提交于 2021-02-13 17:37:48
问题 I'm trying to map array to get image url from Firebase storage and list them to page. The code give me a url, but the problem is that code not set url to img variable on time and returning empty img variable. return( <div> <Header /> {this.state.loaded ? <Loading /> : null} <div> {this.state.productsArr.map((product, i) => { let img = ''; storageRef.child(`images/${product.images[0]}`) .getDownloadURL() .then((url) => { img = url console.log('then img', img) }) .catch((err) => console.log(err