I have a collection with “grup” name and have a subcollection named “anggota”. Please help me, how to display data by query referring to collection document and subcollection document. Firestore collection: I’ve tried with this query but it doesn’t work, the data doesn’t appear Answer When you are using the following query: It means that you are creating a reference
Tag: google-cloud-firestore
How can I delete a document in Firebase after sorting by a specific field?
I am currently working with Android Studio (with Java) and am having some trouble deleting a document. Say I am using a “Collection” with a “document” with a specific “field”. I need to delete the document if the field is “apple” but I don’t know the actual document name. Currently the code that I am using (by looking at other
How to display integer from firebase firestore to Android Studio’s TextView?
I’m currently making a project in which a user segregates their trash and in return, it gives them points. Using those points they can redeem awards. At the moment I’m having trouble how to display the points in Android Studio’s TextView. This is my code. my database structure https://imgur.com/wOGfYOg I want the points to be displayed on my TextView which
should i use firestore database to store a boolean value for my button state (pressed/unpressed)
I’m building a food delivery app using Firestore to populate a RecyclerView, I have a button in every view in RecyclerView. I just want to know if I use Firestore boolean to save my buttons state in view, and give permission to the user to change the boolean value when the button is pressed. it will be a good idea
Add document to Firestore from Beam with auto generated ID
I would like to use Apache Beam Java with the recently published Firestore connector to add new documents to a Firestore collection. While I thought that this should be a relatively easy task, the need for creating com.google.firestore.v1.Document objects seem to make things a bit more difficult. I was using this blog post on Using Firestore and Apache Beam for
Objectify with Firestore native – no matching index found
I have a collection of very simple Java objects which I store in Google Firestore database (native mode) using Objectify 6.0.7. Storing, deleting, and querying objects all work fine, but a query with an orderBy clause on a single field fails with “no matching index found”. The exact same code works perfectly in a Datastore project (so the Java code
How to retrieve multiple username from Firestore and assign the username to the correct markers on map
The code shown below is the code used to retrieve the multiple users location from Realtime Firebase and assign to the markers on map: The structure of the real-time firebase is as follow: The result of the code is as follow: When I click on the marker, it only shows the userID of the user. I want the marker to
How to read data from nested array in Firestore
I have the below structure in my Firestore and I want to read data and store it in ArrayList like I have “amountArrayList” which will read data from the “transactions” field in Firestore, I want to read all the “amount” fields from “transactions” field and make array list of it so that I can show it in list manner. My
android firebase start listing data equal to entered letter
There is a problem with the list inside the “if” it doesn’t work I get an error this:java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List Answer You are getting the following error: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List” In the second if statement, because the type of the “name” field in the database is String and not a List, hence
What Runnable to Pass when adding a listener to ApiFuture and ApiFuture?
I am saving a document to Google Cloud Firestore using Google Cloud Functions in Java language. I want to add a listener to future here. I am unable to find a Runnable which can serve the purpose here. I know I can call future.get() method to hold the execution and get the WriteResult object but I don’t want to do