I wrote the following code: connectedGroup.collection(“users”).document(connectedEmail).get() .addOnSuccessListener(new OnSuccessListener() { …
Tag: google-cloud-firestore
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. …
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 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 …
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
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!
Firestore – Why check if DocumentSnapshot is not null AND call exists?
Take a look at this code example from the Firestore documentation: DocumentReference docRef = db.collection(“cities”).document(“SF”); docRef.get().addOnCompleteListener(new OnCompleteListener<…