0

The firestore get method is asynchronous and it doesn't wait for all the data to be retrieved before executing the next lines of code. In my android app it requires all the data to be present before executing the next steps..

This is not happening and I am getting a nullPointerException because of the next step is executed before even any data is retrieved.

How can I make the code synchronous so that it will wait till all the data is retrieved and execute next steps after that. As there is a small amount of data I don't care about making the thread wait for the retrival.

MMG
  • 3,226
  • 5
  • 16
  • 43

0 Answers0