0

I am trying to get a data from firestore, but did not work.

This is a sample of my data: firestore capture

I have implemented this code, but it doesnt work

firestoreDatabase.collection("orders").whereEqualTo("vendorId", "-N_OTpBgcrtRiOHsUdGY")
            .get().addOnSuccessListener { snapshot ->
            if (snapshot.isEmpty) {
                // No orders found.
                print("No orders found.")
                Log.d("Empty", "Empty")
            } else {
                // The snapshot contains the results of the query.
                for (document in snapshot.documents) {
                    // Each document in the snapshot represents an order.
                    Log.d("Firestore", "Get all data and save locally: $document")
                }
            }
        }.addOnFailureListener { exception ->
            
        }

The Log just keep on giving Empty

0 Answers0