I keep failed to retrieve the data from subcollection “Diary” when trying on click on a RecyclerView. What I want is when I on click on a RecyclerView, it will display that data stored in the “Diary”. What’s the problem with my codes? RecyclerView Java codes: Stored data Java cod…
Tag: google-cloud-firestore
Get the named of Collections from Document on Cloud Firestore
I want to get collections (Col01, Col02, Col03) from the document (Doc01). How can I approach this? Check the attached image. Thanks. Answer There is no API for getting a list of collection names that exist within your (Doc01) document. So, unfortunately, you cannot do that on Android. Because you are looking…
How to retrieve arrays from FirebaseFirestore using Collections?
This is my Firestore database Now here I want to retrieve Description and No. of Options which is saved in the form of an array, my code above prints other details of the data as well, with respect to the topic name selected hence I’ve used whereEqualTo(“Topic Name”, message)as my query(wher…
fhir.executeBundle replacing resource id…How to prevent this?
I am using this Java code to upload a resource to a FHIRstore. The resource is as follows But the id i am using(123456) is getting replaced by a hexadecimal number. This does not happen while using fhirstores.import method Is there any way to stop executeBundle method from replacing my id…as i want to u…
Android Cloud Firestore document fields query
How to query all timestamps for a certain date (20210205) and certain user (ala) from Cloud Firestore in the below example? For now, I can download the entire document and filter it on the device. But it’s not effective. Answer You can filter for FieldPath.documentId() as shown here to get the ala docum…
Is firestore callback method run in a separate thread?
I am fetching Firestore data through RX observable. Is it required to subscribe to it in a separate thread or Firestore callback run off the main thread by default? Also please share any references regarding the Firestore unit test. Answer Is it required to subscribe to it in a separate thread or Firestore ca…
How to get the data from x document and upload it to a new document called ‘name’ and then delete the old one in java
How to get the data from x document and upload it to a new document called ‘name’ and then delete the old one in java I’ve got this code snippet from a Bjorn Reemer but I am unable to get it working in android java Answer you should use a transaction
Filtered Recyclerview on spinner with selected class of the student?
I want get items on RecyclerView based on the student class selected in the spinner. The student has rollno,name, class to be displayed in the RecyclerView. For instance, I want students in class 8th. I am using firebase Firestore. Right now I have recyclerviw which fetches all the documents(students). Update…
Firebase firestore problem ‘Make sure to call FirebaseApp.initializeApp(Context) first’
I’m doing a new project in Android Studio. I’d like to make my project in latest version and with Firebase Firestore to keep data. I know that i need to put apply plugin: ‘com.google.gms.google-services’ but i don’t find how .. and with lot of research, someone said that it is in…
Why does my code do the OnComplete first and the OnSucces later even when OnComplete is above in the code?
Using OnComplete I want to retrieve my documentid. I need this docid inside the OnSucces. So it has to go in that order. Why hadn’t it? LesAdapter.java, with the documentID hardcoded to get good LOGS LOGS: Answer I’m assuming, and I could be wrong, but onComplete triggers as soon as the operation …