FirebaseFirestore.getInstance().collection( "name_collection" )
.whereEqualTo("field", "value" )
.addSnapshotListener(
new EventListener<querysnapshot>()
{
@Override
public void onEvent( @Nullable QuerySnapshot value, @Nullable FirebaseFirestoreException e )
{
// Error handling
if ( e != null )
{
return;
}
Log.e( "MESSAGE", "Number of documents" + value.size() );
// Steps on documents
...
}
}
);</querysnapshot>
Find more questions by tags Vue.jsNoSQLJavaScriptFirebase