firebase-realtime-database

Get downloadURL keeps throwing error 'XMLHttpRequest is not defined' using Firebase

你说的曾经没有我的故事 提交于 2021-01-28 12:12:07
问题 I keep getting a "XMLHttpRequest is not defined" when attempting to get the downloadURL of images I just uploaded to storage. Any thoughts on what is going on here? I can retrieve the metadata, but the image url is not listed in the scheme :/ Node: import firebase, { storage } from './firebase'; const serviceAccount = require('./serviceAccountKey.json'); const admin = require('firebase-admin'); const app = express() const dbUrl = "https://authentication.firebaseio.com" admin.initializeApp({

Delete a specific child node in Firebase swift

只愿长相守 提交于 2021-01-28 11:20:34
问题 Can you help me solve this problem? I want to delete a specific message in the database. My database looks like this: • MESSAGES ••(childByAutoID XXXXXXXXX) •••email: user1@gmail.com •••message: hello there •••timestamp: 329842938592 • ••(childByAutoID XXXXXXXXX) •••email: user1@gmail.com •••message: where are you? •••timestamp: 872985042750 • ••(childByAutoID XXXXXXXXX) •••email: user2@gmail.com •••message: basketball? •••timestamp: 845938459349 I tried using this code but it deletes the

Array List becomes empty after addListenerForSingleValueEvent listener method

核能气质少年 提交于 2021-01-28 10:59:37
问题 I am fetching data from firebase database to a recyclerview. I can't get the data to the RecyclerViewAdapter since the Array list becomes empty after the addListenerForSingleValueEvent method. @Override public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final View view = inflater.inflate(R.layout.fragment_dashboard, container, false); database = FirebaseDatabase.getInstance(); ArrayList<Item> arr = new ArrayList<Item>();

Firebase REST orderby nested child of autogenerate ID?

别说谁变了你拦得住时间么 提交于 2021-01-28 10:40:37
问题 How do I request firebase orderby nested child? My example data look like this: ROOT | +-- post | | | +-- -LHRgRaBkEbh2J04sZcM | | | +-- vote: 1 | +-- -LHRgqbaxDTa5Jl6Wdar | | | +-- vote: 2 | +-- -LHRtsJhu4yl1vi4JS2X | | | +-- vote: 3 | According to firebase docs you can do it like this: curl 'https://dinosaur-facts.firebaseio.com/dinosaurs.json?orderBy="dimensions/height"&startAt=3&print=pretty' but I can't do this since the parent node is autogenerated. orderBy="parent/vote" How can I

Getting an Image uri into render from an async Function

依然范特西╮ 提交于 2021-01-28 09:50:46
问题 having a bit of trouble. I should start by saying I'm really new to react native so hopefully it's not something foolish I've missed. I'm using firebase to store image uri's but when I try to pass them in render from my function it gives me the {_40:0,_65:0,_55:null,_72:null} output but in the function, it seems to get the uri just fine so it seems to be something with passing it back. I've tried using AsyncImage (using the sunglass dog example: https://www.npmjs.com/package/react-native

Write to firebase database from cloud function triggered by PubSub

蓝咒 提交于 2021-01-28 09:44:23
问题 I'm trying to use a daily trigger to alter information in my Firebase database. I have a number of other cloud functions that work properly, but I can't seem to get this function to alter the database. const admin = require('firebase-admin'); exports.daily_job = functions.pubsub.topic('daily-tick').onPublish((event) => { console.log("This job is run every day!"); const databaseRef = admin.database().ref('/accountActions/dailyDeletion'); databaseRef.child('delete').set("Data has been deleted!"

Retreiving data from firebase

笑着哭i 提交于 2021-01-28 08:47:53
问题 Here is my android code for retrieving data from firebase real-time database: package com.example.firebaseapp; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v7.app.AppCompatActivity; import`enter code here` android.view.View; import android.widget.Button; import android.widget.TextView; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; import com.google.firebase.database.DatabaseReference; import

Firebase setPersistenceEnabled(true) what about the downloaded data

雨燕双飞 提交于 2021-01-28 08:47:33
问题 here is my function to get data : public void retrievedata(){ FirstRef.child(obj.getsEventID()).orderByChild("date").addChildEventListener(new ChildEventListener() { @Override public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s) { if (dataSnapshot.exists()) { DisplayMessages(dataSnapshot); } } @Override public void onChildChanged(@NonNull DataSnapshot dataSnapshot, @Nullable String s) { } @Override public void onChildRemoved(@NonNull DataSnapshot dataSnapshot) { }

Android Proguard & FirebaseListAdapter Are conflicting

半城伤御伤魂 提交于 2021-01-28 08:45:16
问题 good evening, I have spent a couple of hours trying to understand whats going on. This is the situation: Made an app, works fine in debug mode, but release mode gives me errors on the FirebaseListAdapter: DatabaseReference ref = FirebaseDatabase.getInstance().getReference("a/"); mAdapter = new FirebaseListAdapter<Acties>(activity, Acties.class, R.layout.list, ref) { @Override public void populateView(View v, Acties model, int position) { ((TextView)v.findViewById(R.id.textView1)).setText

Error when getting an object from DataSnapshot

自作多情 提交于 2021-01-28 08:11:25
问题 I am implementing a database with Firebase for an android application. I present 2 beans : User.class and Address.class , using by the app : @IgnoreExtraProperties public class User { @Exclude private String idAccount; private String firstname; private String lastname; private String pseudo; private Address address; private List<Qualification> qualification; private boolean isWorker; // Constructors + getters + setters } and public class Address { private String houseNumber; private String