I have an app that a user registers animals, these animals are separated by lot, so, to know where the animal is, the user just types his TAG and I look for the tag in all lots of my database, example: Collection> Lots Documents: Lot+NumberLot (Lot+number is the ID, for example: Lot01, Lot02). Within each Document Lot+NumberLot I have a
Tag: firebase
Is there a way in firebase android to fetch data within a range?
I have a database in firebase realtime database.My DB look like this : I want to fetch data within a date range. That is if user select 03-09-2020 as start date and 05-09-2020 as end date,what i want is to display all values of TotalTax field (in this case 3 values 500,500 and 100). How can i achieve this? Hope
How to manage Offline Update state of document in Firestore database withing time interval
I’ve created an application in which I’ve used a Firestore database. Now my tasks are this, User can take action of update document within time duration. I mean if the user tried to update while online mode then there is no problem But if the user device have connection issue of poor network connection then this update action should be
Firebase Auth not getting initialized in spring boot
I am using firebase admin sdk in my spring boot app. (API app) When I run locally in intelliJ its working fine. But when deployed in tomcat its giving me NPE. In Springboot application In API code ERROR: Can someone help in fixing this issue. Thank you in advance. Answer You shouldn’t create an instance of Firebase like this in
How to use WriteBatch with Firebase storage?
I’m using Firebase cloud database and firebase storage. I’m using the following code in order to remove two documents using WriteBatch: I want also to remove the image from the storage using WriteBatch, meaning, if one of them fails, they all fail to remove. I have a variable called imageURL which contains the URL of the image in the firebase
How to retrieve the data from firestore in maps
Is there any way to retrieve the data from firestore in Maps. I am trying but its returning null here is my code But I am getting NullPointerException here Here is the screenshot of the database I am not getting i why getdata function is returning null Here is the error log Answer You are getting null because the database
save unique key firebase to child
I have a database like this I want to save a unique key “-MCzU6r-JqvAkC9unjru” in my child, like this can I do that? if can how I can implement it in my code? here code for add data to firebase Answer You can do the following: Using getKey() you can retrieve the random id created using push() and then add
What is the proper way to set a value listener in Firebase Cloud database?
I wrote the following code: It fetches the user’s full name and image and set them in the menu. I want to set a listener to those two fields so every time there is a change in the database, it will update connectedFullName and connectedImageURL and call the setMenuAvatarImage, setMenuHeaderMessage methods. How can I do it? Answer What you’re describing
Data Retrieval from Firestore is erratic
I’m working on an Android app that does the following: Upon app start-up, it checks if a user is logged in, using AuthStateListener. If there is a user logged in, it retrieves data from Firestore. The user data is stored in a document that I named with the following nomenclature: “User ” + user’s_email_ID. For example, if a user has
How to get Firebase token of current user
I’m buildning an app where a logged in user can invite another user through pressing a button, so then the invited user will get a push notification. My idea is that if I can save the token for each user in the database, then when a user presses the “invite button” it will find that users token in the database