I have next firestore scheme: collection “users” – document user_id – collection “trips” – document trip_id – collection “requests” – document request_user_id with fields: and boolean field <is_accepted> On one of my pages I want to listen to realtime updates of requests: if <is_accepted> changes from 0 to 1(it means user is accepted for a trip). I have written EventListener
Tag: google-cloud-firestore
get data with query from document collection and document subcollection in firestore
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
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
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
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
React native firebase crashes when using emulator
I’m struggling for a few days now on using firestore emulator in a react-native project Whenever the code reaches a firestore hit the application crash without any log (RN side). Now I know RNFirebase is well installed as I can hit firestore real server. I’ve checked the logcat and it gives me this error. Here is my packages.json And I
How to access array data from Firebase Firestore?
I have a Firebase Firestore database that looks like this: And I want to store that data in my ArrayList<> If You are not understanding anything you can check my previous question Question Link StackOverFlow Answer To display the of your favFoods array, please use the following lines of code: So as you can see, you should call get() and