firebase-realtime-database

How to restict timely manner update document in Firestore database with poor network connections

一曲冷凌霜 提交于 2021-01-05 07:00:25
问题 I've create android application in which we used Firestore database. I want to update firebase document within time. Firestore is quick to post on server but when there is any connection issue then it taking time to save on Firestore My task is if User tried to update withing few seconds eg 20 seconds if user can't post that data on server withing 20 seconds then later on that update should not be post on server If user is online and have good connection then there is no problem but if there

How to restict timely manner update document in Firestore database with poor network connections

不想你离开。 提交于 2021-01-05 07:00:06
问题 I've create android application in which we used Firestore database. I want to update firebase document within time. Firestore is quick to post on server but when there is any connection issue then it taking time to save on Firestore My task is if User tried to update withing few seconds eg 20 seconds if user can't post that data on server withing 20 seconds then later on that update should not be post on server If user is online and have good connection then there is no problem but if there

Convert ServerValue.TIMESTAMP To date

时间秒杀一切 提交于 2021-01-04 05:52:26
问题 I have put a button to save the current Date and Time to My Firebase Database . private void saveTime() { DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference(); rootRef.child(Uid).child("time").setValue(ServerValue.TIMESTAMP); } I am trying to compare the server Date with My saved Date which i putted in my database . So please help me to compare it. private void Compare() { DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference(); DatabaseReference

Firebase (Angular) Promises with Loops in Loops

别等时光非礼了梦想. 提交于 2021-01-04 05:31:40
问题 How do you execute a function only after all the promises are resolved where you have to wait for async calls in loops within loops? The code is simplified to the minimum $scope.book = function(input) { //Get the cart items from DB ref.child('/cart/' + userId).once('value').then(function(cartSnap) { //Loop through the cart items cartSnap.forEach(function(cartItemSnap) { var itemId = cartItemSnap.key(); //Get the inventory items from DB that are in the cart ref.child('/inventory/' + itemId)

Firebase DatabaseURL - configuring firebase

删除回忆录丶 提交于 2021-01-03 06:38:06
问题 I'm trying to use Firebase with my react app. I have a file with the config as follows: import * as firebase from 'firebase'; const config = { apiKey: process.env.FIREBASE_API_KEY, authDomain: process.env.FIREBASE_AUTH_DOMAIN, databaseURL: process.env.FIREBASE_DB_URL, projectId: process.env.FIREBASE_PROJECT_ID, storageBucket: process.env.FIREBASE_STORAGE_BUCKET, messagingSenderId: process.env.FIREBASE_MESSAGE_ID, } if (!firebase.apps.length) { firebase.initializeApp(config); } const database

How to add Search Filter in RecyclerView from firebase [duplicate]

十年热恋 提交于 2021-01-03 06:22:37
问题 This question already has an answer here : Firebase Realtime Database Search by word in between the query? (1 answer) Closed 1 year ago . I have worked for search about how to search in FireBase by value and I couldn't have a fully answer so I am asking now I have used this method and I couldn't get the correct result: public class Search extends Fragment { public Search() { // Required empty public constructor } private SearchView mSearch; private RecyclerView rvSearch; private

Python-Firebase listener implementation

匆匆过客 提交于 2021-01-02 08:31:47
问题 Is there a way where you can actively have a listener for a Firebase Database in Python? For instance, I have a node user in the database, I want to be able to actively listen for any changes that immediately happens for a user and immediately make changes on it. For now, I'm just using a for-loop. In my case, I have something like sync_state for user with the integer value 3 . It gets changed to 4 when the session has been ended, I want to update value for that user. Right now, I run the for

Python-Firebase listener implementation

≯℡__Kan透↙ 提交于 2021-01-02 08:29:40
问题 Is there a way where you can actively have a listener for a Firebase Database in Python? For instance, I have a node user in the database, I want to be able to actively listen for any changes that immediately happens for a user and immediately make changes on it. For now, I'm just using a for-loop. In my case, I have something like sync_state for user with the integer value 3 . It gets changed to 4 when the session has been ended, I want to update value for that user. Right now, I run the for

Python-Firebase listener implementation

三世轮回 提交于 2021-01-02 08:26:36
问题 Is there a way where you can actively have a listener for a Firebase Database in Python? For instance, I have a node user in the database, I want to be able to actively listen for any changes that immediately happens for a user and immediately make changes on it. For now, I'm just using a for-loop. In my case, I have something like sync_state for user with the integer value 3 . It gets changed to 4 when the session has been ended, I want to update value for that user. Right now, I run the for

How to restrict email domains in Firebase Authentication

邮差的信 提交于 2021-01-01 06:41:26
问题 I have a question regarding firebase authentication. Actully I am making a dashboard for my company, and I will host it in firebase. I want to restrict the email authentication only to my comany domain (ex: cat.com). But I went through the stackoverflow answers and I found I can impose rule in database. But the issue is that I will be calling external databases to fetcj data using Firebase Function and serve it to website(dashboard). So no domain specific rule will apply there. Below is the