firebase-realtime-database

Cloud Function deletes node instantly instead of after two hours based off timestamp (delete-old-child-nodes not working)

梦想的初衷 提交于 2020-01-06 08:36:15
问题 I am trying to implement the "delete-old-child-nodes" Cloud Functions example (https://github.com/firebase/functions-samples/tree/master/delete-old-child-nodes). When the directory is written to, it should delete all nodes that are 2+ hours old. However, it just deletes all nodes no matter what. I found this StackOverflow post that describes the same issue. However, I believe the cause is different. The user was storing his timestamp in seconds, while the cutoff was in milliseconds. In my

How to automate the process of generating daily report from firebase? [closed]

大兔子大兔子 提交于 2020-01-06 08:21:13
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . For example, to automate the process of producing a daily report for selected events and the duration of time that unique users spend on some specific event. And it is even better if I can customize the reporting information and have it generated in excel sheet automatically. Any

javascript - “then” executing before the loop completes in firebase

做~自己de王妃 提交于 2020-01-06 08:09:52
问题 EDIT: changed the code as suggested by the answer, using promises. It prints before Added all tags and then the various Found I have the following code to fill an array with some keys from Firebase: var userTags = []; var arrayPromises = []; user_pref.once('value', function(preferenze){ preferenze.forEach(function(t){ ref.once('value', function(tags){ arrayPromises.push(arrayPromises.push(new Promise(function (resolve, reject) { tags.forEach(function (t1){ if(t.key == t1.key){ console.log(

Firebase data to Spinner

你。 提交于 2020-01-06 08:08:46
问题 Data trying to access Firebase Database Screenshot I'm trying to store all the values to a spinner but it seems like using arraylist and many other functions aren't even helping much. So, I'm just adding the code without spinner. Final result should be to show all values in a spinner. SymptomActivity.java package com.example.nishantsikri.microdoctor; import android.content.Intent; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support

javascript - “then” executing before the loop completes in firebase

前提是你 提交于 2020-01-06 08:08:15
问题 EDIT: changed the code as suggested by the answer, using promises. It prints before Added all tags and then the various Found I have the following code to fill an array with some keys from Firebase: var userTags = []; var arrayPromises = []; user_pref.once('value', function(preferenze){ preferenze.forEach(function(t){ ref.once('value', function(tags){ arrayPromises.push(arrayPromises.push(new Promise(function (resolve, reject) { tags.forEach(function (t1){ if(t.key == t1.key){ console.log(

Why is Firebase Automatic Screen Reporting causing my iOS app to crash?

孤人 提交于 2020-01-06 08:03:05
问题 I want to write data to Firebase Database using basic write code. I am programming in Swift so I created the reference to the database and followed the official directions on Firebase's help page. When I run the app using the write command: override func viewDidLoad() { ref = Database.database().reference() ref.childByAutoId().setValue(titleText) } The app crashed and gives me the error: Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the

Why is Firebase Automatic Screen Reporting causing my iOS app to crash?

时光总嘲笑我的痴心妄想 提交于 2020-01-06 08:03:05
问题 I want to write data to Firebase Database using basic write code. I am programming in Swift so I created the reference to the database and followed the official directions on Firebase's help page. When I run the app using the write command: override func viewDidLoad() { ref = Database.database().reference() ref.childByAutoId().setValue(titleText) } The app crashed and gives me the error: Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the

Can't pass null for argument 'pathString' in child()

好久不见. 提交于 2020-01-06 07:19:11
问题 I'm currently trying to read the contents from my Firebase Database into a RecyclerView but I want to load them from the last node to first node. So I decided to place the keys into an array then try to read from end of the array to the front, but when I try to access the key array I am presented with Can't pass null for argument 'pathString' in child() error. Below is the method I am using to load the data: @Override public void onStart() { super.onStart(); FirebaseRecyclerAdapter

Data fetching in navigation drawer (Android)

五迷三道 提交于 2020-01-06 07:17:08
问题 I am trying to fetch the logged in user's name from firebase database and trying to place it the navigation drawer's header below the default image of android. But when I try to do so the app crashes and when the activity launches. I tried retriving name in simple textView in activity it works but when I try to update the name in navigation header it fails and crashes. How to do get this thing worked. myRef.addValueEventListener(new ValueEventListener() { @Override public void onDataChange

How to retrieve images from firebase storage and place in RecycleView: android., I'm trying to retrieve the images in the uploads! folder

拈花ヽ惹草 提交于 2020-01-06 06:57:38
问题 I am trying to get the images from firebase storage into my app on recycler view. The text related to the image is coming up but no image is shown. I am not sure where I am going wrong. I am using Picasso in my ImageViewAdapter to get the images. //This Is my imageViewAdapter public class ImageAdapter extends RecyclerView.Adapter<ImageAdapter.ImageViewHolder> { private Context context; private List<Upload> mupload; public ImageAdapter(Context context, List<Upload> uploads){ this.context =