firebase-realtime-database

Firebase run script after retrieving existing data

旧街凉风 提交于 2019-12-24 06:16:17
问题 I have a function in js that needs to refresh after I retrieve data from Firebase. firebase.database().ref('/users/' + this.userId + '/info').on('child_added', function(snapshot){ this.myFunction(); }.bind(this)); The problem is that the data in Firebase is very large so I don't what to run the function lots of times. This is how I what it to run: Retrieve ALL EXISTING data from Firebase. Run the function (once). Every time more data comes in from Firebase, run the function again. Is this

setInterval on firebase instead of using cron

我是研究僧i 提交于 2019-12-24 06:01:48
问题 I am making a spam counter ( on Firebase ). What I do is I use database trigger on firebase cloud functions to increment a path (/counter/${uid}). This path will hold an integer for each user that other path will have a security rule that reference to it and check whether it exceed the limit. However, I would like to clear the counter once a day. When I search on google I found official way of firebase to do this by using another Google cloud service to deploy cron job. However, I wonder if I

How to see Debug logging in firebase?

╄→гoц情女王★ 提交于 2019-12-24 06:00:33
问题 I am using firebase version 11.0.1 I try this code FirebaseDatabase.getInstance().setLogLevel(Logger.Level.DEBUG); but it doesn't work! syntax error.. I click on level class and this is what I see??? package com.google.firebase.database; public interface Logger { public static enum Level { zzbYY, zzbYZ, zzbZa, zzbZb, zzbZc; private Level() { } } } Is deprecated? How to do it? 来源: https://stackoverflow.com/questions/44767654/how-to-see-debug-logging-in-firebase

setInterval on firebase instead of using cron

断了今生、忘了曾经 提交于 2019-12-24 06:00:25
问题 I am making a spam counter ( on Firebase ). What I do is I use database trigger on firebase cloud functions to increment a path (/counter/${uid}). This path will hold an integer for each user that other path will have a security rule that reference to it and check whether it exceed the limit. However, I would like to clear the counter once a day. When I search on google I found official way of firebase to do this by using another Google cloud service to deploy cron job. However, I wonder if I

How to see Debug logging in firebase?

心已入冬 提交于 2019-12-24 06:00:11
问题 I am using firebase version 11.0.1 I try this code FirebaseDatabase.getInstance().setLogLevel(Logger.Level.DEBUG); but it doesn't work! syntax error.. I click on level class and this is what I see??? package com.google.firebase.database; public interface Logger { public static enum Level { zzbYY, zzbYZ, zzbZa, zzbZb, zzbZc; private Level() { } } } Is deprecated? How to do it? 来源: https://stackoverflow.com/questions/44767654/how-to-see-debug-logging-in-firebase

SQL Server and Firebase/PouchDB synchronization

…衆ロ難τιáo~ 提交于 2019-12-24 05:55:04
问题 I am building a web application where the client needs browser access to data storage while offline. I'm thinking of using either a Firebase or PouchDB database to achieve this inside the application. However, for the back-end I am using SQL Server. Can I synchronize the data from Firebase/PouchDB over to ms sql server engine and store it persistently? Will MS SQL Server's JSON support allow me to do this or am I wasting my time going down this route? The application is being written using

Can someone tell me why I keep getting error “unexpected non-void return value in void function”

喜欢而已 提交于 2019-12-24 05:47:17
问题 I get an error when trying to return a true or false Bool value... Can someone help ? I was trying to check if user exists in Firebase database. func checkIfUserExists(email: String) -> Bool{ FIRDatabase.database().reference().child("users").observe(.childAdded, with: { (snapshot) in if let dictionary = snapshot.value as? [String: AnyObject]{ switch email { case dictionary["email"] as! String!: return true break default: return false break } } }, withCancel: nil) } 回答1: change it this way

Am I able to load another users profile image in firebase android?

会有一股神秘感。 提交于 2019-12-24 05:45:07
问题 Am I able to load another users profile image if I have their email but I'm logged in as another user? 回答1: If you are using Firebase Storage then technically yes, it's just a file system that you can retrieve any file from. Users won't have access to this without forging your app/obtaining the api key. It's your app that is in control of retrieving the correct image for a user, Firebase Storage doesn't have the concept of security other than your app signing key being associated with the

setValue onComplete not called from Firebase on Android

时光怂恿深爱的人放手 提交于 2019-12-24 05:45:06
问题 I'm using security rules to determine in which conditions a value can be written to the database. At the moment I've setup the security rules, these are working fine (I checked with the simulator), so no issues so far. In case that permission to write is denied (security rules not met), I want to take some action. In order to do this, I'm planning to use onComplete on setValue and if there is an error I will have to do some code. At the moment, if the security rules are met, the values are

Cast Error with FirebaseRecyclerViewAdapter

血红的双手。 提交于 2019-12-24 05:07:05
问题 So I have a RecycleView that I'm to fill with a FirebaseRecyclerViewAdapter. I'm following this example: https://github.com/firebase/firebaseui-android#using-a-recyclerview I'm getting a strange error, though: java.lang.ClassCastException: android.support.v7.widget.AppCompatTextView cannot be cast to android.view.ViewGroup This is what I have in onCreateView: RecyclerView recycler = (RecyclerView) mView.findViewById(R.id.rvTasks); recycler.setLayoutManager(new LinearLayoutManager(getActivity(