Running Firebase Get() In A Loop In Android
I am working on an android project and have encountered a problem in getting firebase firestore documents in a loop. //getting the document snapshot out of the uIds
Solution 1:
Okay so a solution for people, having the same kind of situation; would be using another data structure which does not depends upon the order of adding of elements.
I used a Hashmap<String, DocumentSnapshot> to do the job with the string being the UID.
So, in whatever order they are added, we get the DocumentSnaphot by their respective UID, further.
Post a Comment for "Running Firebase Get() In A Loop In Android"