skip to Main Content

Firebase – Handle huge number of index in Firestore queries

Here is my code: Query query = firestore.collection("users") .document(myUserID) .collection("unseen_profiles") .whereEqualTo("country", myProfileCountryFilter); if (!myProfileGenderFilter.isEmpty() && !myProfileGenderFilter.equalsIgnoreCase("everyone")) { query = query.whereEqualTo("gender", myProfileGenderFilter); } if (heightFilterOn) { query = query.whereGreaterThanOrEqualTo("height", minimumHeight); } if (weightFilterOn) { query = query.whereLessThanOrEqualTo("weight", maximumWeight); } if (customAgeFilterOn)…

VIEW QUESTION

Firebase – why does the wrong toast message keep appearing?

I have a class called BookRoomActivity: public class BookRoomActivity extends AppCompatActivity { String staffPromotionCode; EditText etRoomName,etprice,etDate,etCapacity,etPromotion; Button btnBook; FirebaseFirestore db; final boolean[]promotionCodeMatched = {false}; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_book_room); // Retrieve promotion code set by staff from…

VIEW QUESTION
Back To Top
Search