firebase-realtime-database

Android, on finish loading data from firebase

故事扮演 提交于 2020-01-14 06:34:15
问题 How to show the Progressbar on start of the activity that contains recycler view which should be hidden once the recycler view loads the data from firebase database? In onCreate method I am showing my ProgressBar but I don't know when should I hide it. Can you guys give me some ideas? Thanks 回答1: Assuming you are using a FirestoreRecyclerAdapter , to solve this, create a new object of ProgressBar and start showing it in the onCreate() method, or if you want add it directly in your .XML file

Android, on finish loading data from firebase

半城伤御伤魂 提交于 2020-01-14 06:34:07
问题 How to show the Progressbar on start of the activity that contains recycler view which should be hidden once the recycler view loads the data from firebase database? In onCreate method I am showing my ProgressBar but I don't know when should I hide it. Can you guys give me some ideas? Thanks 回答1: Assuming you are using a FirestoreRecyclerAdapter , to solve this, create a new object of ProgressBar and start showing it in the onCreate() method, or if you want add it directly in your .XML file

Android, on finish loading data from firebase

我的梦境 提交于 2020-01-14 06:34:05
问题 How to show the Progressbar on start of the activity that contains recycler view which should be hidden once the recycler view loads the data from firebase database? In onCreate method I am showing my ProgressBar but I don't know when should I hide it. Can you guys give me some ideas? Thanks 回答1: Assuming you are using a FirestoreRecyclerAdapter , to solve this, create a new object of ProgressBar and start showing it in the onCreate() method, or if you want add it directly in your .XML file

Method onCancelled is never used in Firebase

好久不见. 提交于 2020-01-14 06:06:35
问题 I'm trying to send a query on database to display the associated node number if it matches with the string 'token' inputed by the user. However, I'm getting a 'Method does not override method from its superclass' and 'Method onCancelled is never used in method' just for the onCancelled function. Where am I going wrong? buttonSave.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //Creating firebase object Firebase ref = new Firebase(Config.FIREBASE_URL);

Firebase v3 - How to Reinitialize Default App?

断了今生、忘了曾经 提交于 2020-01-14 02:14:27
问题 If I modify the initializeApp config object parameters via scripting how could I reinitialize the app to use the new values? The only way it works now is to reload/refresh the page. Any ideas? 回答1: You can delete and then reinitialize the the app with firebase.app().delete().then(function() { firebase.initializeApp(myNewConfig); }); Alternatively, you can keep the old app around and initialize a new app with a different name: firebase.initializeApp(myConfig1); firebase.initializeApp(myConfig2

FirebaseIndexRecyclerAdapter onDataChanged is called but getItemCount() always return 0

别等时光非礼了梦想. 提交于 2020-01-13 19:49:21
问题 I'm using FirebaseIndexRecyclerAdapter which gets a keyRef and dataRef and is very helpful with getting all dataRef's children which their keys exists as children in keyRef. The data is being displayed correctly but if i'm overriding onDataChanged for hiding a progress bar and/or displaying an empty state depends on the itemsCount (Something which i've already done with FirebaseRecyclerAdapter and works as expected) but getItemCount always return 0(!) private class MYAdapter extends

Firebase how to write security rule for a child that is 2 level random id deep in the tree

China☆狼群 提交于 2020-01-13 18:00:59
问题 I have a database node called (people) that looks like this: people | | -------UserID1 //which is a random id | | | | | ----UserId2 //which is a random id | | | | | name:"some_name" | id:"UserId2" | image:"image_url" | | | -------UserId2 | | ----UserId3 | | name:"some_name" id:"UserId3" image:"image_url" If we look at the (people / UserID1 / UserId2) node : Since UserId1 and UserId2 are 2 random ids, then if we want to write a rule to UserId2 we will notice that it is 2 random id level deep.

Import JSON file without overwriting the existing data in Firebase

烂漫一生 提交于 2020-01-13 14:58:20
问题 Can I know if there is any way I could import my JSON file into Firebase without overwriting the existing data? 回答1: You can Import JSON at any location in the Firebase Database console. So not just at the root, but also at a specific path under it, e.g. /users , /users/charlinagnes , etc. When you import JSON at a location, Firebase performs a setValue() operation at that location. So it overwrites the existing data at that location with the new JSON you provide. There is no UI for

Using a proxy for firebase real time db connection

风格不统一 提交于 2020-01-13 12:04:27
问题 I'm developing android app. I need to connect my app to firebase real time db to get some information and authenticate my user. But, the problem is that I have to connect to firebase through proxy - our company proxy. I checked some solutions to set proxy such as this. but this solutions will pass webView requests through proxy. Is there any solution to pass firebase query requests through proxy? Does anyone have any solution for that? 回答1: After many googling and testing different methods, I

Using a proxy for firebase real time db connection

て烟熏妆下的殇ゞ 提交于 2020-01-13 12:04:23
问题 I'm developing android app. I need to connect my app to firebase real time db to get some information and authenticate my user. But, the problem is that I have to connect to firebase through proxy - our company proxy. I checked some solutions to set proxy such as this. but this solutions will pass webView requests through proxy. Is there any solution to pass firebase query requests through proxy? Does anyone have any solution for that? 回答1: After many googling and testing different methods, I