Skip to content

Tag: google-cloud-firestore

Event Listener in Firestore doesn’t see field updates in documents inside collection. Android, Java

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

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

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