I created the database in Firebase and tried to show the marker in the map. Still not working. what should I do. The app runs but when map activity is opened the app closes. I creates the database manually. I referred this link :- Retrieve location from Firebase and put marker on google map api for android. This is the
Tag: firebase
Getting the current User information from Firebase Realtime Database
I developed a login app in Java where the user can login using their emailaddress and password. This works fine so far, but I have the problem that my UserModel.java is null when I get to my home activity. This also makes sense to me since Firebase Auth only checks the email and password and does not select the relevant
Firestore Paging Adapter- How to know if query returns 0 results
I’m using firestore paging adapter to populate my RecyclerView with data from Firestore, if collection in Firestore is empty I would like to show a TextView to inform user about that, if it is not then I would like to populate EecyclerView with data but I don’t see a way to do this with Firestore paging adapter because I can’t
How to populate a spinner with the result of a Firestore query?
I am creating a spinner which will show the subject name. The subject names are stored in my Firestore database as follows: I could fetch the result to an RecyclerView but unable to help myself to do so for spinner. Answer To solve this, please use the following lines of code: The result will be a spinner that will contain
How to fix Android Cloud Firestore document snapshot
I am checking if the user has made an appointment in the database if not add the user(add a new document which has the user details). The problem with my app is that it runs both AddUser() and AlertUser() functions: Answer What does this code do is checking whether a document with the userIdentity id actually exists. If it doesn’t
FireStore date query not working as expected
I have doc which has a date object. Code to init Firestore: Code to query: I am always getting all the records and looks like the where clause is not getting applied. On Firebase console I see that the endDate is stored as timestamp. Doc from Firebase console: Answer Cloud Firestore queries are immutable, which means that you cannot change
Checking if a document exists in a Firestore collection
I have a Firestore collection tree in which I plan to store only one document. I want to check if that collection contains that document and if so, retrieve the id of the document! Any ideas/thoughts? Thanks 🙂 Answer If you want to check a particular document for existence based on its document id, please use the following lines of
What is the correct way to structure this kind of data in Firestore?
I have seen videos and read the documentation of Cloud firestore, from Google Firebase service, but I can’t figure this out coming from realtime database. I have this web app in mind in which I want to store my providers from different category of products. I want perform a search query through all my products to find what providers I
How can i make the app work offline with Firebase database
My app gets the data while its connected to internet but I want the app to get the data offline from cache. Please help I’m new to Firebase.
How to update array elements in Firestore with Android?
I read this post and this post of the same guy saying that you cannot update array elements. I also read a recent article, where is says that this can be done somehow with arrayUnion or something like that but I cannot get any informations on stackoverflow either in the docs. Is there any way I can solve this? Thanks!